source: josm/trunk/.github/workflows/ant-test.yml@ 18756

Last change on this file since 18756 was 18725, checked in by taylor.smock, 14 months ago

Dependency updates

  • .github workflows:
    • Add Java 20, 21-ea, remove unsupported versions (Java 18, 19)
    • JavaFX: 17.0.2 -> 17.0.7
  • ivy.xml
    • jacoco: 0.8.8 -> 0.8.10
      • Support Java 19 and 20, experimental support for Java 21
    • equalsverifier: 3.12.3 -> 3.14.1
      • Add support for sealed types
      • Improved NPE error messages
      • Prefab values for java.io.PrintStream
    • Apache commons-compress: 1.22 -> 1.23.0
    • classgraph: 4.8.154 -> 4.8.158
    • JUnit: 5.9.2 -> 5.9.3
  • tools/ivy.xml
    • proguard-ant: 7.3.0 -> 7.3.2
      • Java 20 support
    • pmd: 6.53.0 -> 6.55.0 (last 6.x release)
      • Java 20 support
    • animal-sniffer-ant-tasks: 1.22 -> 1.23
      • Java 19+ support
File size: 2.4 KB
Line 
1name: Java CI Test
2env:
3 junit_platform_version: '1.9.3'
4on:
5 - push
6 - pull_request
7
8defaults:
9 run:
10 shell: bash
11
12jobs:
13
14 test:
15 runs-on: ${{ matrix.os }}
16 env:
17 LANG: en_US.UTF-8
18 strategy:
19 fail-fast: false
20 matrix:
21 # test against latest update of each major Java version, as well as specific updates of LTS versions:
22 java: [8, 11, 17, 20, 21-ea]
23 os: [ubuntu-latest, macos-latest, windows-latest]
24 name: Java ${{ matrix.java }} on ${{ matrix.os }}
25 steps:
26 - name: Checkout
27 uses: actions/checkout@v3
28 with:
29 fetch-depth: 256
30
31 - name: Cache
32 uses: actions/cache@v3
33 with:
34 path: |
35 ~/.ivy2/cache/
36 ~/work/josm/josm/tools/
37 key: ${{ runner.os }}-ivy2-${{ hashFiles('build.xml', 'ivy.xml', 'tools/ivy.xml') }}
38
39 - name: Setup Java ${{ matrix.java }}
40 uses: actions/setup-java@v3
41 with:
42 distribution: 'zulu'
43 java-version: ${{ matrix.java }}
44
45 - name: Install Ant
46 uses: JOSM/JOSMPluginAction/actions/setup-ant@v1
47
48 - name: Test with Ant
49 run: |
50 ANT="ant -DnoJavaFX=true test-unit-hardfail"
51 $ANT -Dtest.headless=true
52
53 - name: Dump errors if failed
54 if: ${{ failure() }}
55 run: "grep -L ', Failures: 0, Skipped: ' test/report/*.txt | xargs cat"
56
57 - name: Upload Ant reports
58 if: ${{ always() }}
59 uses: actions/upload-artifact@v3
60 with:
61 name: Ant reports for JOSM ${{ needs.createrelease.outputs.josm_revision }} on java ${{ matrix.java }} on ${{ matrix.os }}
62 path: |
63 test/report/*.txt
64 test/report/TEST*.xml
65
66 publish-test-results:
67 name: "Publish Unit Tests Results"
68 needs: test
69 runs-on: ubuntu-latest
70 # the test job might be skipped, we don't need to run this job then
71 if: success() || failure()
72
73 steps:
74 - name: Download Artifacts
75 uses: actions/download-artifact@v3
76 with:
77 path: artifacts
78
79 - name: Publish Test Report with action-junit-report
80 if: ${{ always() }}
81 uses: mikepenz/action-junit-report@v3
82 with:
83 report_paths: 'artifacts/**/*.xml'
84 token: ${{ secrets.GITHUB_TOKEN }}
85
86 - name: Publish Test Report with publish-unit-test-result-action
87 uses: EnricoMi/publish-unit-test-result-action@v2
88 with:
89 files: 'artifacts/**/*.xml'
Note: See TracBrowser for help on using the repository browser.