mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 17:13:51 +00:00
47 lines
824 B
YAML
47 lines
824 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/...
|