Repository navigation
48 lines (43 loc) · 1.56 KB
/
Copy pathbuild.yml
File metadata and controls
48 lines (43 loc) · 1.56 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
42
43
44
45
46
47
48
name: Build
on:
push:
branches: ['**'] # all branches incl. main, NOT tags (tags → release flow)
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
name: Build for JDK ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
matrix:
java: [11, 17, 21]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
cache: maven
- name: Build & test
run: mvn -B -ntp verify
traceability:
name: Check requirement <-> test chain
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Neither Maven nor a JDK: the check only reads .docs/specs/ and the
# *Test.java files as text. It rides in its own job rather than inside
# the `build` matrix because it has nothing to do with which JDK
# compiled the code -- in the matrix it would run three times over and
# report a broken chain three times for the same reason.
# --source adds testcases/: the actual @Test methods live in the
# Abstract*Testcase base classes there (Template-Method pattern), whose
# filenames don't match the default *Test.java scan.
- name: Check requirement <-> test chain
run: |
python3 bin/traceability/traceability.py --spec-root .docs --source-root . \
--source src/test/java/com/github/zrdj/java/predicates/testcases