databricks-cli/.github/workflows/push.yml

51 lines
1.2 KiB
YAML
Raw Normal View History

2022-05-16 11:02:12 +00:00
name: build
on:
pull_request:
types: [opened, synchronize]
push:
2022-05-16 11:03:02 +00:00
branches: [main]
2022-05-16 11:02:12 +00:00
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
2022-05-16 11:02:12 +00:00
uses: actions/checkout@v2
with:
token: ${{ secrets.DECO_GITHUB_TOKEN }}
submodules: recursive
2022-05-16 11:02:12 +00:00
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.18.x
2022-05-16 11:02:12 +00:00
- name: Cache packages
uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
/opt/hostedtoolcache/go
vendor
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set go env
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
go get gotest.tools/gotestsum
go install honnef.co/go/tools/cmd/staticcheck@latest
2022-05-16 11:02:12 +00:00
- name: Pull external libraries
run: make vendor
- name: Run tests
run: make test