-
-
Notifications
You must be signed in to change notification settings - Fork 352
137 lines (123 loc) · 3.89 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
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
# Workflow for testing Spoon.
#
# Note that actions are specified by commit hash. This is to avoid the security
# risk of someone injecting malicious code into a release and then simply
# changing a tag.
name: tests
on:
pull_request:
branches:
- master
push:
branches:
- master
- chore/flakey-flakey-rise-and-shine
schedule:
- cron: "0 0 * * *"
env:
MAVEN_OPTS: >-
-Dmaven.resolver.transport=native
-Daether.connector.connectTimeout=300000
-Daether.connector.requestTimeout=300000
jobs:
test-linux:
runs-on: ${{ matrix.os }}
name: Tests with Java ${{ matrix.java }} on ${{ matrix.os }}
strategy:
matrix:
java: [11, 17, 20, 21-ea]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- name: Setup env
uses: ./.github/actions/setup-tests
- name: Time nix setup
run: nix develop .#jdk${{ matrix.java }} --command true
- name: Test
run: nix develop .#jdk${{ matrix.java }} --command test
test-windows:
runs-on: windows-latest
name: Tests with Java 17 on windows-latest
steps:
- name: Disable Git's autocrlf
run: git config --global core.autocrlf false
- name: git checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
fetch-depth: 0
- uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
- name: Test
run: |
cp chore/logback.xml src/test/resources/
mvn -f spoon-pom test
cat testResults.spoon
coverage:
runs-on: ubuntu-latest
name: Test with coverage
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- name: Setup env
uses: ./.github/actions/setup-tests
- name: Time nix setup
run: nix develop --command true
- name: Run tests with coverage
run: nix develop --command coverage
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
extra:
runs-on: ubuntu-latest
name: Extra checks
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- name: Setup env
uses: ./.github/actions/setup-tests
- name: Time nix setup
run: nix develop .#extraChecks --command true
- name: Run extra checks
run: nix develop .#extraChecks --command extra
- name: Trigger extra remote tasks
if: github.repository == 'INRIA/spoon' && github.event_name == 'pull_request'
run: nix develop .#extraChecks --command extra-remote
- name: Run Javadoc quality check
run: nix develop .#extraChecks --command javadoc-quality
reproducible-builds:
runs-on: ubuntu-latest
name: reproducible-builds
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- name: Setup env
uses: ./.github/actions/setup-tests
- name: Time nix setup
run: nix develop --command true
- name: Check status
run: nix develop --command reproducible-builds
maven-central-requirements:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
fetch-depth: 0
- name: Setup env
uses: ./.github/actions/setup-tests
- name: Time nix setup
run: nix develop --command true
- name: Check maven pom quality
run: nix develop --command maven-pom-quality