-
-
Notifications
You must be signed in to change notification settings - Fork 33
92 lines (89 loc) · 2.27 KB
/
tests.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
# This callable workflow is called from separate workflows for each Ubuntu
# runner version. We use separate workflows for runner version rather than a
# matrix to allow creating status badges for each runner version.
name: Tests
on:
workflow_call:
inputs:
runner-os:
required: true
type: string
defaults:
run:
shell: bash
jobs:
test:
name: ${{ inputs.runner-os }}-clang-format-${{ matrix.clang-format-version }}
runs-on: ${{ inputs.runner-os }}
strategy:
fail-fast: false
matrix:
clang-format-version:
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
steps:
- uses: actions/checkout@v4
- name: Build and test the Docker image
run: test/test.sh ${{ matrix.clang-format-version }}
e2e:
name: E2E ${{ inputs.runner-os }}-clang-format-${{ matrix.clang-format-version }}-${{ matrix.path['check'] }}
runs-on: ${{ inputs.runner-os }}
strategy:
fail-fast: false
matrix:
clang-format-version:
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
path:
- check: 'test/known_fail'
exclude: 'capital'
known_fail: true
- check: 'test/known_pass'
exclude: 'capital'
known_fail: false
- check: 'test/load_test'
exclude: 'capital'
known_fail: false
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++ programs.
id: check
uses: ./../clang-format-action
continue-on-error: ${{ matrix.path['known_fail'] }}
with:
check-path: ${{ matrix.path['check'] }}
clang-format-version: ${{ matrix.clang-format-version }}
exclude-regex: ${{ matrix.path['exclude'] }}
- name: Incorrect success on known-fail test
if: ${{ steps.check.outcome == 'success' && matrix.path['known_fail'] }}
run: exit 1