forked from llamastack/llama-stack-k8s-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.15 KB
/
code-coverage.yml
File metadata and controls
41 lines (34 loc) · 1.15 KB
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
name: Tests Code Coverage
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [ main ]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Set up limgo
uses: GoTestTools/limgo-action@d4a725a46ab3bdbbf23186bbbe54b4ff4a35d5a7 # v1.0.2
with:
version: "v1.0.0"
install-only: true
- name: Run tests
run: |
make test
- name: Gather and calculate test coverage
run: |
limgo -coverfile=cover.out -outfmt=md -outfile=/tmp/covcheck.md -v=4 -config=.limgo.json
cat /tmp/covcheck.md >> $GITHUB_STEP_SUMMARY
- name: Upload test coverage results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: ${{ always() }}
with:
name: test-coverage-results
path: /tmp/covcheck.md
if-no-files-found: error