Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI Test | |
env: | |
junit_platform_version: '1.7.2' | |
# ANT_HOME is also our ant version | |
ANT_HOME: 'apache-ant-1.10.12' | |
on: | |
- push | |
- pull_request | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
env: | |
LANG: en_US.UTF-8 | |
strategy: | |
fail-fast: false | |
matrix: | |
# test against latest update of each major Java version, as well as specific updates of LTS versions: | |
java: [8, 11, 17, 18, 19-ea] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
name: Java ${{ matrix.java }} on ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 256 | |
- name: Cache | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.ivy2/cache/ | |
~/work/josm/josm/tools/ | |
key: ${{ runner.os }}-ivy2-${{ hashFiles('build.xml', 'ivy.xml', 'tools/ivy.xml') }} | |
- name: Setup Java ${{ matrix.java }} | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java }} | |
- name: Install Ant ${{ env.ANT_HOME }} | |
run: | | |
if [ ! -f tools/${{ env.ANT_HOME }}-bin.tar.gz ]; then | |
curl -o tools/${{ env.ANT_HOME }}-bin.tar.gz https://downloads.apache.org/ant/binaries/${{ env.ANT_HOME }}-bin.tar.gz | |
fi | |
tar zxf tools/${{ env.ANT_HOME }}-bin.tar.gz | |
- name: Ant diagnostics | |
run: ${{ env.ANT_HOME }}/bin/ant -diagnostics | |
- name: Test with Ant | |
run: | | |
ANT="${{ env.ANT_HOME }}/bin/ant -DnoJavaFX=true test-unit-hardfail" | |
$ANT -Dtest.headless=true | |
- name: Dump errors if failed | |
if: ${{ failure() }} | |
run: "grep -L ', Failures: 0, Skipped: ' test/report/*.txt | xargs cat" | |
- name: Upload Ant reports | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Ant reports for JOSM ${{ needs.createrelease.outputs.josm_revision }} on java ${{ matrix.java }} on ${{ matrix.os }} | |
path: | | |
test/report/*.txt | |
test/report/TEST*.xml | |
publish-test-results: | |
name: "Publish Unit Tests Results" | |
needs: test | |
runs-on: ubuntu-latest | |
# the test job might be skipped, we don't need to run this job then | |
if: success() || failure() | |
steps: | |
- name: Download Artifacts | |
uses: actions/[email protected] | |
with: | |
path: artifacts | |
- name: Publish Test Report with action-junit-report | |
if: ${{ always() }} | |
uses: mikepenz/action-junit-report@v2 | |
with: | |
report_paths: 'artifacts/**/*.xml' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish Test Report with publish-unit-test-result-action | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
with: | |
files: 'artifacts/**/*.xml' |