-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (62 loc) · 2.2 KB
/
qa.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
62
63
64
65
66
---
name: QA
on: # yamllint disable-line rule:truthy
pull_request:
types: [opened, synchronize]
paths:
- ".github/workflows/qa.yml"
- "go.*"
- "**.go"
push:
branches: [main]
permissions:
contents: read
pull-requests: read
checks: write
jobs:
lint:
name: Run linters
runs-on: ubuntu-latest
env:
# renovate: datasource=github-releases depName=radiofrance/lint-config
LINT_CONFIG_VERSION: v1.0.0
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: "go.mod"
- name: Download golangci-lint config file
run: curl -o .golangci.yml https://raw.githubusercontent.com/radiofrance/lint-config/${{ env.LINT_CONFIG_VERSION }}/.golangci.yml
- uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
# renovate: datasource=github-releases depName=golangci/golangci-lint
version: v1.60.2
tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: "go.mod"
- uses: tlylt/install-graphviz@b2201200d85f06f0189cb74d9b69208504cf12cd # v1.0.0
- run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./...
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: coverage-results
path: coverage.out
retention-days: 1
codecov:
name: Upload coverage to Codecov
needs: [tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: coverage-results
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true