-
Notifications
You must be signed in to change notification settings - Fork 6
57 lines (51 loc) · 1.61 KB
/
quality.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# 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.21.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.21.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
env:
UPSTREAM_PROXY_URL: ${{ secrets.UPSTREAM_PROXY_URL }}
UPSTREAM_PROXY_USERNAME: ${{ secrets.UPSTREAM_PROXY_USERNAME }}
UPSTREAM_PROXY_PASSWORD: ${{ secrets.UPSTREAM_PROXY_PASSWORD }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.21.x
- run: go run ci/mage.go -v TestE2e