|
3 | 3 | workflow_dispatch: |
4 | 4 | push: |
5 | 5 | jobs: |
6 | | - use-action: |
| 6 | + standard-usage: |
7 | 7 | runs-on: ${{ matrix.os }}-latest |
8 | 8 | strategy: |
9 | 9 | fail-fast: false |
10 | 10 | matrix: |
11 | 11 | os: [windows, ubuntu, macos] |
12 | 12 | steps: |
13 | | - - name: Checkout repository |
| 13 | + - name: Checkout this repository |
14 | 14 | |
15 | 15 |
|
16 | | - - name: Configure and build the example project |
| 16 | + - name: Configure and build the test project |
17 | 17 | |
18 | 18 | with: |
19 | 19 | source-dir: test |
20 | 20 | generator: Ninja |
21 | 21 | cxx-compiler: g++ |
22 | 22 |
|
23 | | - - name: Test the example project |
| 23 | + - name: Test the test project |
24 | 24 | run: ctest --test-dir build |
25 | 25 |
|
26 | 26 | - name: Use this action |
27 | 27 | uses: ./ |
28 | 28 |
|
29 | | - use-action-llvm: |
| 29 | + llvm-usage: |
30 | 30 | runs-on: ${{ matrix.os }}-latest |
31 | 31 | strategy: |
32 | 32 | fail-fast: false |
33 | 33 | matrix: |
34 | 34 | os: [windows, ubuntu, macos] |
35 | 35 | steps: |
36 | | - - name: Checkout repository |
| 36 | + - name: Checkout this repository |
37 | 37 | |
38 | 38 |
|
39 | | - - name: Configure and build the example project |
| 39 | + - name: Configure and build the test project |
40 | 40 | |
41 | 41 | with: |
42 | 42 | source-dir: test |
43 | 43 | generator: Ninja |
44 | 44 | c-compiler: clang |
45 | 45 | cxx-compiler: clang++ |
46 | 46 |
|
47 | | - - name: Test the example project |
| 47 | + - name: Test the test project |
48 | 48 | run: ctest --test-dir build |
49 | 49 |
|
50 | | - - name: Use this action with specified gcov executable |
| 50 | + - name: Use this action with llvm-cov as the gcov executable |
51 | 51 | uses: ./ |
52 | 52 | with: |
53 | 53 | gcov-executable: ${{ matrix.os == 'macos' && 'xcrun ' || '' }}llvm-cov gcov |
54 | 54 |
|
55 | | - use-action-from-different-root: |
56 | | - runs-on: ubuntu-latest |
| 55 | + exclusion-usage: |
| 56 | + runs-on: ${{ matrix.os }}-latest |
| 57 | + strategy: |
| 58 | + fail-fast: false |
| 59 | + matrix: |
| 60 | + os: [windows, ubuntu, macos] |
57 | 61 | steps: |
58 | | - - name: Checkout repository |
| 62 | + - name: Checkout this repository |
59 | 63 | |
60 | 64 |
|
61 | | - - name: Build and test example project |
62 | | - working-directory: test |
63 | | - run: | |
64 | | - cmake . -B build |
65 | | - cmake --build build |
66 | | - ctest --test-dir build |
67 | | -
|
68 | | - - name: Use this action from build root |
69 | | - id: failed_step |
70 | | - continue-on-error: true |
71 | | - uses: ./ |
72 | | - with: |
73 | | - root: test/build |
74 | | - fail-under-line: 100 |
75 | | - |
76 | | - - name: Check if previous step is failing |
77 | | - run: ${{ steps.failed_step.outcome == 'failure' && true || false }} |
78 | | - |
79 | | - - name: Use this action from build root but without fail threshold |
80 | | - uses: ./ |
81 | | - with: |
82 | | - root: test/build |
83 | | - |
84 | | - - name: Use this action from project root |
85 | | - uses: ./ |
| 65 | + - name: Configure and build the test project |
| 66 | + |
86 | 67 | with: |
87 | | - root: test |
88 | | - fail-under-line: 100 |
89 | | - |
90 | | - use-action-with-exclusion: |
91 | | - runs-on: ubuntu-latest |
92 | | - steps: |
93 | | - - name: Checkout repository |
94 | | - |
| 68 | + source-dir: test |
| 69 | + build-dir: test/build |
| 70 | + generator: Ninja |
| 71 | + cxx-compiler: g++ |
| 72 | + args: -DTEST_EVEN=OFF -DTEST_ODD=OFF |
95 | 73 |
|
96 | | - - name: Build and test example project |
97 | | - working-directory: test |
98 | | - run: | |
99 | | - cmake . -B build -DTEST_EVEN=OFF -DTEST_ODD=OFF |
100 | | - cmake --build build |
101 | | - ctest --test-dir build |
| 74 | + - name: Test the test project |
| 75 | + run: ctest --test-dir test/build |
102 | 76 |
|
103 | | - - name: Use this action without exclusion |
| 77 | + - name: Use this action without an exclusion |
104 | 78 | id: failed_step |
105 | 79 | continue-on-error: true |
106 | 80 | uses: ./ |
107 | 81 | with: |
| 82 | + root: test |
108 | 83 | fail-under-line: 100 |
109 | 84 |
|
110 | | - - name: Check if previous step is failing |
| 85 | + - name: Check if the previous step did fail |
111 | 86 | run: ${{ steps.failed_step.outcome == 'failure' && true || false }} |
112 | 87 |
|
113 | | - - name: Use this action without exclusion but with lower fail threshold |
| 88 | + - name: Use this action without an exclusion but with a lower fail threshold |
114 | 89 | uses: ./ |
115 | 90 | with: |
| 91 | + root: test |
116 | 92 | fail-under-line: 50 |
117 | 93 |
|
118 | | - - name: Use this action with exclusion |
| 94 | + - name: Use this action with an exclusion |
119 | 95 | uses: ./ |
120 | 96 | with: |
| 97 | + root: test |
121 | 98 | exclude: test/include/* |
122 | 99 | fail-under-line: 100 |
123 | 100 |
|
124 | | - use-action-generate-coveralls: |
| 101 | + coveralls-usage: |
125 | 102 | runs-on: ${{ matrix.os }}-latest |
126 | 103 | strategy: |
127 | 104 | fail-fast: false |
128 | 105 | matrix: |
129 | 106 | os: [windows, ubuntu, macos] |
130 | 107 | steps: |
131 | | - - name: Checkout repository |
| 108 | + - name: Checkout this repository |
132 | 109 | |
133 | 110 |
|
134 | | - - name: Configure and build the example project |
| 111 | + - name: Configure and build the test project |
135 | 112 | |
136 | 113 | with: |
137 | 114 | source-dir: test |
138 | 115 | generator: Ninja |
139 | 116 | cxx-compiler: g++ |
140 | 117 |
|
141 | | - - name: Test the example project |
| 118 | + - name: Test the test project |
142 | 119 | run: ctest --test-dir build |
143 | 120 |
|
144 | | - - name: Use this action to generate Coveralls report |
| 121 | + - name: Use this action to generate a Coveralls report |
145 | 122 | uses: ./ |
146 | 123 | with: |
147 | 124 | coveralls-out: coveralls.json |
148 | 125 |
|
149 | | - - name: Check if Coveralls report exist |
| 126 | + - name: Check if that Coveralls report does exist |
150 | 127 | run: cat coveralls.json |
151 | 128 |
|
152 | | - - name: Use this action to generate and send Coveralls report |
| 129 | + - name: Use this action to generate and send another Coveralls report |
153 | 130 | uses: ./ |
154 | 131 | with: |
155 | 132 | coveralls-send: true |
156 | 133 | github-token: ${{ secrets.GITHUB_TOKEN }} |
157 | 134 |
|
158 | | - - name: Use this action to generate and send Coveralls report on specified output |
| 135 | + - name: Use this action to generate and send another Coveralls report on a specified output |
159 | 136 | uses: ./ |
160 | 137 | with: |
161 | 138 | coveralls-out: coveralls-2.json |
162 | 139 | coveralls-send: true |
163 | 140 | github-token: ${{ secrets.GITHUB_TOKEN }} |
164 | 141 |
|
165 | | - - name: Check if Coveralls report exist |
| 142 | + - name: Check if that Coveralls report does exist |
166 | 143 | run: cat coveralls-2.json |
0 commit comments