-
Notifications
You must be signed in to change notification settings - Fork 7
168 lines (141 loc) · 3.99 KB
/
test.yaml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: Test
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
standard-usage:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [windows, ubuntu, macos]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Build Sample Project
uses: threeal/[email protected]
with:
source-dir: sample
generator: Ninja
cxx-compiler: g++
run-build: true
- name: Test Sample Project
uses: threeal/[email protected]
with:
test-dir: sample/build
- name: Use this action
uses: ./
llvm-usage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Install LLVM
run: sudo apt-get install -y llvm
- name: Build Sample Project
uses: threeal/[email protected]
with:
source-dir: sample
generator: Ninja
c-compiler: clang
cxx-compiler: clang++
run-build: true
- name: Test Sample Project
uses: threeal/[email protected]
with:
test-dir: sample/build
- name: Use this action with llvm-cov as the gcov executable
uses: ./
with:
gcov-executable: llvm-cov gcov
exclusion-usage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Build Sample Project
uses: threeal/[email protected]
with:
source-dir: sample
generator: Ninja
cxx-compiler: g++
args: -DTEST_EVEN=OFF -DTEST_ODD=OFF
run-build: true
- name: Test Sample Project
uses: threeal/[email protected]
with:
test-dir: sample/build
- name: Use this action without an exclusion
id: failed_step
continue-on-error: true
uses: ./
with:
root: sample
fail-under-line: 100
- name: Check if the previous step did fail
run: ${{ steps.failed_step.outcome == 'failure' && true || false }}
- name: Use this action without an exclusion but with a lower fail threshold
uses: ./
with:
root: sample
fail-under-line: 50
- name: Use this action with an exclusion
uses: ./
with:
root: sample
excludes: sample/include/*
fail-under-line: 100
- name: Use this action with multiple exclusions
uses: ./
with:
root: sample
excludes: |
sample/include/is_even.hpp
sample/include/is_odd.hpp
fail-under-line: 100
xml-out-usage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Build Sample Project
uses: threeal/[email protected]
with:
source-dir: sample
run-build: true
- name: Test Sample Project
uses: threeal/[email protected]
with:
test-dir: sample/build
- name: Use this action to generate an XML report
uses: ./
with:
xml-out: coverage.xml
- name: Check if that XML report does exist
run: cat coverage.xml
coveralls-usage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Build Sample Project
uses: threeal/[email protected]
with:
source-dir: sample
run-build: true
- name: Test Sample Project
uses: threeal/[email protected]
with:
test-dir: sample/build
- name: Use this action to generate a Coveralls report
uses: ./
with:
coveralls-out: coveralls.json
- name: Check if that Coveralls report does exist
run: cat coveralls.json
- name: Use this action to generate and send another Coveralls report
uses: ./
with:
coveralls-send: true