mirror of https://github.com/databricks/cli.git
run tests on push or PR
This commit is contained in:
parent
1b38687e2d
commit
bf801c2605
|
@ -0,0 +1,47 @@
|
|||
name: build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Unshallow
|
||||
run: git fetch --prune --unshallow
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.16.x
|
||||
|
||||
- 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@v0.2.2
|
||||
|
||||
- name: Pull external libraries
|
||||
run: make vendor
|
||||
|
||||
- name: Run tests
|
||||
run: make test
|
|
@ -15,3 +15,6 @@ bricks
|
|||
# Dependency directories (remove the comment below to include it)
|
||||
vendor/
|
||||
dist/
|
||||
|
||||
*.log
|
||||
coverage.txt
|
|
@ -1,5 +1,7 @@
|
|||
# Bricks!
|
||||
|
||||
[![build](https://github.com/databricks/bricks/workflows/build/badge.svg?branch=main)](https://github.com/databricks/bricks/actions?query=workflow%3Abuild+branch%3Amain)
|
||||
|
||||
This is an early PoC at this stage!
|
||||
|
||||
`make build` (or [download the latest from releases page](https://github.com/databricks/bricks/releases)).
|
||||
|
|
|
@ -65,7 +65,7 @@ func (p *Project) IsDevClusterJustReference() bool {
|
|||
if p.DevCluster.ClusterName == "" {
|
||||
return false
|
||||
}
|
||||
return reflect.DeepEqual(p.DevCluster, clusters.Cluster{
|
||||
return reflect.DeepEqual(p.DevCluster, &clusters.Cluster{
|
||||
ClusterName: p.DevCluster.ClusterName,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue