bbgo_origin/.github/workflows/go.yml

50 lines
889 B
YAML
Raw Permalink Normal View History

2021-12-04 16:37:46 +00:00
name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
2021-12-04 16:44:11 +00:00
strategy:
matrix:
redis-version:
- 6.2
2021-12-04 16:44:11 +00:00
2021-12-04 16:37:46 +00:00
steps:
- uses: actions/checkout@v2
2021-12-04 16:49:29 +00:00
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup redis
uses: shogo82148/actions-setup-redis@v1
2021-12-04 16:44:11 +00:00
with:
redis-version: ${{ matrix.redis-version }}
# auto-start: "false"
2021-12-04 16:44:11 +00:00
2021-12-04 16:37:46 +00:00
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Build
run: go build -v ./cmd/bbgo
- name: Test
run: go test -v ./pkg/...
2022-02-15 02:56:09 +00:00
- name: TestDnum
2022-02-15 05:59:41 +00:00
run: go test -tags dnum -v ./pkg/...