Skip to content

Commit

Permalink
Configure CI workflow with Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Waldz committed May 7, 2024
1 parent 99b1d84 commit 8e111bc
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/quality.yml
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

0 comments on commit 8e111bc

Please sign in to comment.