forked from jsonnet-bundler/jsonnet-bundler
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request jsonnet-bundler#184 from suriya-ganesh/github-acti…
…ons-fix enabling github actions
- Loading branch information
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Default Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
tags: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
go_version: [1.16, 1.17, 1.18] | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go_version }} | ||
install-go: true | ||
|
||
- name: Cache Go Modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: go-${{ matrix.go_version }}-${{ runner.os }} | ||
|
||
- name: Check Go version | ||
run: go version | ||
|
||
- name: Go mod vendor | ||
run: go mod vendor | ||
- name: Git diff check | ||
run: git diff --exit-code | ||
|
||
- name: Build and Test | ||
run: | | ||
make build | ||
make test | ||
make test-integration | ||
- name: Check License and Generate | ||
run: | | ||
make check-license | ||
make generate | ||
git diff --exit-code | ||
- name: Cleanup | ||
run: go clean -modcache | ||
|
||
- name: Post Cleanup | ||
run: go clean -cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters