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

Last change on this file since 18020 was 18020, checked in by Don-vip, 3 years ago

update to ant 1.10.11

File size: 2.7 KB
Line 
1name: Java CI Test
2env:
3 junit_platform_version: '1.7.2'
4 # ANT_HOME is also our ant version
5 ANT_HOME: 'apache-ant-1.10.11'
6on:
7 - push
8 - pull_request
9
10defaults:
11 run:
12 shell: bash
13
14jobs:
15
16 test:
17 runs-on: ${{ matrix.os }}
18 env:
19 LANG: en_US.UTF-8
20 strategy:
21 fail-fast: false
22 matrix:
23 # test against latest update of each major Java version, as well as specific updates of LTS versions:
24 java: [8, 11, 16, 17-ea, 18-ea]
25 os: [ubuntu-latest, macos-latest, windows-latest]
26 exclude:
27 - java: 8
28 os: macos-latest
29 - java: 11
30 os: macos-latest
31 name: Java ${{ matrix.java }} on ${{ matrix.os }}
32 steps:
33 - name: Checkout
34 uses: actions/checkout@v2
35 with:
36 fetch-depth: 256
37
38 - name: Cache
39 uses: actions/cache@v2.0.0
40 with:
41 path: |
42 ~/.ivy2/cache/
43 ~/work/josm/josm/tools/
44 key: ${{ runner.os }}-ivy2-${{ hashFiles('build.xml', 'ivy.xml', 'tools/ivy.xml') }}
45
46 - name: Setup Java ${{ matrix.java }}
47 uses: actions/setup-java@v2
48 with:
49 distribution: 'zulu'
50 java-version: ${{ matrix.java }}
51
52 - name: Install Ant ${{ env.ANT_HOME }}
53 run: |
54 if [ ! -f tools/${{ env.ANT_HOME }}-bin.tar.gz ]; then
55 curl -o tools/${{ env.ANT_HOME }}-bin.tar.gz https://downloads.apache.org/ant/binaries/${{ env.ANT_HOME }}-bin.tar.gz
56 fi
57 tar zxf tools/${{ env.ANT_HOME }}-bin.tar.gz
58
59 - name: Ant diagnostics
60 run: ${{ env.ANT_HOME }}/bin/ant -diagnostics
61
62 - name: Test with Ant
63 run: |
64 ANT="${{ env.ANT_HOME }}/bin/ant -DnoJavaFX=true test-unit-hardfail"
65 $ANT -Dtest.headless=true
66
67 - name: Dump errors if failed
68 if: ${{ failure() }}
69 run: "grep -L ', Failures: 0, Skipped: ' test/report/*.txt | xargs cat"
70
71 - name: Upload Ant reports
72 if: ${{ always() }}
73 uses: actions/upload-artifact@v2
74 with:
75 name: Ant reports for JOSM ${{ needs.createrelease.outputs.josm_revision }} on java ${{ matrix.java }} on ${{ matrix.os }}
76 path: 'test/report/*.txt'
77
78 - name: Publish Test Report with junit-report-annotations-action
79 uses: ashley-taylor/junit-report-annotations-action@1.3
80 if: ${{ always() }}
81 with:
82 path: 'test/report/TEST*.xml'
83 access-token: ${{ secrets.GITHUB_TOKEN }}
84
85 - name: Publish Test Report with action-junit-report
86 if: ${{ always() }}
87 uses: mikepenz/action-junit-report@v2
88 with:
89 report_paths: 'test/report/TEST*.xml'
90 token: ${{ secrets.GITHUB_TOKEN }}
Note: See TracBrowser for help on using the repository browser.