Debian Codegraph @

.github/workflows/test.yml

raw
1 name: Test
2
3 on:
4 push:
5 paths-ignore:
6 - docs/**
7
8 jobs:
9 test:
10 strategy:
11 matrix:
12 go-version: [ 1.25.x ]
13
14 runs-on: ubuntu-latest
15
16 steps:
17 - name: Set up Go 1.x
18 uses: actions/setup-go@v6
19 with:
20 go-version: ${{ matrix.go-version }}
21 id: go
22
23 - name: Check out code into the Go module directory
24 uses: actions/checkout@v6
25
26 - name: Unit tests
27 run: make test.unit
28
29 - name: Process coverage report
30 run: bash ./.github/workflows/scripts/coverage-report.sh
31 env:
32 INPUT_COVERAGE: coverage.txt
33
34 - name: Upload badge to Gist
35 uses: popsiclestick/gist-sync-action@88f8633178625914f2a01abf1a765f7272a580fa # v1.2.0
36 if: >
37 success()
38 && hashFiles('coverage.svg') != ''
39 && !github.event.repository.fork
40 && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
41 with:
42 gist_url: https://gist.github.com/maypok86/2aae2cd39836dc7c258df7ffec602d1c
43 auth: ${{ secrets.GIST_TOKEN }}
44 gist_description: Otter's coverage badge
45 github_file: coverage.svg
46 gist_title: coverage.svg
47
48 - name: Upload report to Gist
49 uses: popsiclestick/gist-sync-action@88f8633178625914f2a01abf1a765f7272a580fa # v1.2.0
50 if: >
51 success()
52 && hashFiles('coverage.html') != ''
53 && !github.event.repository.fork
54 && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
55 with:
56 gist_url: https://gist.github.com/maypok86/97c79c864eb1e0fea3a7c430f39acc82
57 auth: ${{ secrets.GIST_TOKEN }}
58 gist_description: Otter's coverage report
59 github_file: coverage.html
60 gist_title: coverage.html