-
Notifications
You must be signed in to change notification settings - Fork 13
61 lines (57 loc) · 1.54 KB
/
pr.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
58
59
60
61
name: pr
on:
pull_request:
branches: [ main ]
paths-ignore:
- '**/README.md'
- '**/bench/**'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
env:
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v4
with:
submodules: false
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '>=1.22.0'
check-latest: true
cache-dependency-path: "**/*.sum"
- run: go version
- name: Vendoring and Tidy
run: go mod tidy && go mod vendor
- name: Install dependencies
run: |
go install github.com/ory/go-acc@latest
- name: Run tests
run: |
go-acc ./... -o coverage.out --ignore goaktpb,mocks,internal/internalpb,bench -- -mod=vendor -race -v
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.out
fail_ci_if_error: false
verbose: true
lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '>=1.22.0'
check-latest: true
cache-dependency-path: "**/*.sum"
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.1
args: --timeout 10m --config .golangci.yml