-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure CI workflow with Github actions
- Loading branch information
Showing
1 changed file
with
53 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,53 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: "Check code quality" | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Push events to matching v*, i.e. v1.0, v20.15.10 | ||
push: | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
|
||
unit-test: | ||
name: "Unit tests" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18.x | ||
- run: go run ci/mage.go -v Test | ||
|
||
check: | ||
name: "Quality checks" | ||
runs-on: ubuntu-latest | ||
env: | ||
GOPATH: ${{ github.workspace }} | ||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: ${{ github.workspace }}/src/github.com/${{ github.repository }} | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18.x | ||
- run: go run ci/mage.go -v CheckCopyright | ||
- run: go run ci/mage.go -v CheckGoImports | ||
- run: go run ci/mage.go -v CheckGoLint | ||
- run: go run ci/mage.go -v CheckGoVet | ||
|
||
e2e-test: | ||
name: "End-to-end tests" | ||
needs: [ unit-test, check ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18.x | ||
- run: go run ci/mage.go -v TestE2e |