-
-
Notifications
You must be signed in to change notification settings - Fork 24
92 lines (77 loc) · 2.25 KB
/
parallel.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: parallel
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
test-pkgs:
name: test pkgs
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run tests coverage
run: go test ./coverage/... -coverprofile=coverage_coverage.out -covermode=count
- name: Run tests ratio
run: go test ./ratio/... -coverprofile=coverage_ratio.out -covermode=count
- name: Run tests badge
run: go test ./badge/... -coverprofile=coverage_badge.out -covermode=count
- uses: actions/upload-artifact@v4
with:
name: coverage-report-files-pkgs
path: |
coverage_coverage.out
coverage_ratio.out
coverage_badge.out
test-other:
name: test other
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run tests other
run: go test $(go list ./... | grep -v coverage | grep -v ratio | grep -v badge) -coverprofile=coverage_other.out -covermode=count
- uses: actions/upload-artifact@v4
with:
name: coverage-report-files-other
path: |
coverage_other.out
collect-metrics:
name: collect metrics
needs:
- test-pkgs
- test-other
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBUG: 1
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up Go
id: setup-go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/download-artifact@v4
with:
pattern: coverage-report-files*
merge-multiple: true
- name: Build octocov and run as a action
uses: ./testdata/actions/collect
env:
GOTOOLCHAIN: 'go${{ steps.setup-go.outputs.go-version }}'