-
Notifications
You must be signed in to change notification settings - Fork 18
93 lines (70 loc) · 1.95 KB
/
pull_request.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Test Provider
on: pull_request
jobs:
lint:
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
cache: false
- name: Avoid Typecheck Error On Embedded Fields
run: |
touch acceptance/keys/instance-level-admin-sa.json
touch acceptance/keys/org-level-admin-sa.json
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3
github-token: ${{ github.token }}
only-new-issues: true
skip-pkg-cache: true
skip-build-cache: true
test:
runs-on: ubuntu-20.04
permissions:
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Make Machinekey Directory Writable
working-directory: acceptance
run: "chmod -R 777 keys"
- name: Setup ZITADEL
working-directory: acceptance
run: docker compose run setup
- name: Download Go Modules
run: go mod download
- name: Run Acceptance Tests
run: TF_ACC=1 go test -coverprofile=profile.cov ./...
- name: Publish Coverage
uses: codecov/[email protected]
with:
file: profile.cov
name: acceptance-tests
flags: acceptance-tests
- name: Save Docker Compose Logs
if: always()
working-directory: acceptance
run: docker compose logs > .docker-compose.log
- name: Archive Docker Compose Logs
if: always()
uses: actions/upload-artifact@v3
with:
name: pull-request-tests
path: |
acceptance/.docker-compose.log
retention-days: 30