-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (53 loc) · 1.71 KB
/
ci-rebac-admin-backend.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
name: ci-rebac-admin-backend
run-name: CI (rebac-admin) for ${{ github.sha }} on ${{ github.ref_name }}
on:
workflow_dispatch:
push:
branches:
- "feature-rebac-admin-ui-backend"
pull_request:
branches:
- "*"
permissions:
contents: read
pull-requests: read
checks: write
jobs:
lint:
name: Perform linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
name: Checkout repo
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
name: Setup Go version
with:
go-version-file: 'go.mod'
- name: Generate mocks
working-directory: ./rebac-admin-backend
run: make mocks
- uses: golangci/golangci-lint-action@v3
name: Perform linting and annotate code
with:
version: latest
working-directory: ./rebac-admin-backend
only-new-issues: true
unit-test:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
with:
go-version-file: 'go.mod'
- name: Build and test Go code
working-directory: ./rebac-admin-backend
run: make ARGS="-count=1" test-coverage
- uses: codecov/codecov-action@c4cf8a4f03f0ac8585acb7c1b7ce3460ec15782f # v4
with:
files: ./rebac-admin-backend/coverage.out
- name: Upload Go test results
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
with:
name: Go-results
path: ./rebac-admin-backend/test.json