Update WikipediaAppTest#testEntriesFromClipboardWikidata to match cur… #11
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 | |
on: | |
push: | |
branches: [ main, fixup-tests ] | |
pull_request: | |
branches: [ main ] | |
release: | |
types: [created] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
- name: Cache | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/.ivy2/cache/ | |
$GITHUB_WORKSPACE/josm/core/tools/ | |
key: ${{ runner.os }}-ivy2-${{ hashFiles('josm/plugins/${{ github.event.repository.name }}/build.xml', 'josm/plugins/00_core_tools/ivy.xml', 'josm/core/ivy.xml', 'josm/core/tools/ivy.xml') }} | |
- name: Clone JOSM | |
run: | | |
svn co --depth=immediates https://josm.openstreetmap.de/osmsvn/applications/editors/josm $GITHUB_WORKSPACE/josm | |
cd $GITHUB_WORKSPACE/josm | |
svn up --set-depth=immediates plugins | |
svn up --set-depth=infinity --accept=theirs-full core i18n plugins/{00_core_test_config,00_core_test_lib,00_core_tools,00_tools} | |
svn propget svn:externals | grep core | xargs -L1 svn co | |
cd core | |
ant dist | |
cd ../plugins | |
svn propget svn:externals | grep 00_core | xargs -L1 svn co | |
- uses: actions/checkout@v3 | |
with: | |
path: josm/plugins/${{ github.event.repository.name }} | |
- name: Build with Ant | |
run: | | |
cd $GITHUB_WORKSPACE/josm/plugins/${{ github.event.repository.name }} | |
if [ $GITHUB_REF_TYPE == "tag" ]; then | |
version=$GITHUB_REF_NAME | |
else | |
version="$GITHUB_REF_NAME-$GITHUB_SHA" | |
fi | |
ant -noinput -buildfile build.xml -Dplugin.version=$version | |
- name: Test with Ant | |
run: | | |
cd $GITHUB_WORKSPACE/josm/plugins/${{ github.event.repository.name }} | |
ant -noinput -buildfile build.xml -Dplugin.version=$version -Dtest.headless test | |
- 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 plugin ${{ github.event.repository.name }} | |
path: | | |
$GITHUB_WORKSPACE/josm/plugins/${{ github.event.repository.name }}/test/report/*.txt | |
$GITHUB_WORKSPACE/josm/plugins/${{ github.event.repository.name }}/test/report/TEST*.xml | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
josm/dist/${{ github.event.repository.name }}.jar | |
josm/dist/${{ github.event.repository.name }}-javadoc.jar | |
josm/dist/${{ github.event.repository.name }}-sources.jar |