mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
50 lines
889 B
YAML
50 lines
889 B
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
redis-version:
|
|
- 6.2
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- 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
|
|
with:
|
|
redis-version: ${{ matrix.redis-version }}
|
|
# auto-start: "false"
|
|
|
|
- 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/...
|
|
|
|
- name: TestDnum
|
|
run: go test -tags dnum -v ./pkg/...
|