Skip to content

Commit 08271b0

Browse files
Improve the ci structure
1 parent a893841 commit 08271b0

4 files changed

Lines changed: 61 additions & 103 deletions

File tree

.github/workflows/ci-build.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Java CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 20
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
java-version: ["8", "14", "17"]
18+
include:
19+
- java-version: "8"
20+
maven-opts: "-Djacoco.skip=true"
21+
- java-version: "14"
22+
maven-opts: ""
23+
- java-version: "17"
24+
maven-opts: "-Djacoco.skip=true"
25+
permissions:
26+
contents: read
27+
steps:
28+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
with:
30+
persist-credentials: false
31+
- name: Install JDK ${{ matrix.java-version }}
32+
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
33+
with:
34+
java-version: ${{ matrix.java-version }}
35+
distribution: "adopt"
36+
- name: Run all tests
37+
run: |
38+
if [ ${{ matrix.java-version }} == "8" ]; then
39+
export TRAVIS_JDK=openjdk8
40+
fi
41+
./scripts/run_no_prep_tests.sh -ci
42+
env:
43+
SKIP_UNSTABLE_TESTS: 1
44+
MAVEN_OPTS: ${{ matrix.maven-opts }}
45+
- name: Upload test results to Codecov
46+
if: ${{ !cancelled() }}
47+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
48+
with:
49+
directory: .
50+
files: "**/target/surefire-reports/TEST-*.xml"
51+
fail_ci_if_error: true
52+
flags: jdk-${{ matrix.java-version }}
53+
report_type: test_results
54+
token: ${{ secrets.CODECOV_TOKEN }}
55+
- name: Upload coverage to Codecov
56+
if: ${{ !cancelled() && hashFiles('**/target/site/jacoco/jacoco.xml') != '' }}
57+
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
58+
with:
59+
files: "**/target/site/jacoco/jacoco.xml"
60+
flags: jdk-${{ matrix.java-version }}
61+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/unit-tests-jdk-14.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/unit-tests-jdk-17.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/unit-tests-jdk-8.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)