fix getLinkTarget for MEI 5 work titles #318
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: Build, test, and tag | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
branches: [ develop, main ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build Edirom Online | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Get short sha | |
uses: benjlevesque/[email protected] | |
id: short-sha | |
with: | |
length: 7 | |
- name: Build Edirom Online from ${{ github.ref }} at ${{ github.sha }} | |
run: docker run --rm -v $(pwd):/app -w /app --entrypoint ./build.sh bwbohl/sencha-cmd | |
- name: Upload Artifacts to action run | |
if: github.repository == 'Edirom/Edirom-Online' | |
uses: actions/upload-artifact@v4 | |
with: | |
# The name that the artifact will be made available under | |
name: EdiromOnline_${{ steps.short-sha.outputs.sha }}.zip | |
# The path to retrieve the artifact | |
path: ${{ github.workspace }}/build-xar/Edirom-Online-*.xar | |
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn` | |
#optional retention-days: 1 to 90 | |
outputs: | |
# saving this as output for following jobs to pick up | |
artifact_name: EdiromOnline_${{ steps.short-sha.outputs.sha }}.zip | |
check-language-files: | |
name: Check alignment of language files | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install libsaxonhe-java for XQuery support | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsaxonhe-java | |
- name: Run test | |
run: ant -lib /usr/share/java/ check-language-files | |
xqunit: | |
name: Run XQSuite unit tests | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install libxml2-utils for xmllint | |
run: | | |
sudo apt-get update | |
sudo apt-get install libxml2-utils | |
- name: Download artifact from previous job | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ needs.build.outputs.artifact_name }} | |
path: xars | |
- name: Create Docker container | |
run: | | |
docker create --rm --name edirom-online -p 8080:8080 stadlerpeter/existdb:6 | |
for i in xars/*.xar ; do docker cp $i edirom-online:/opt/exist/autodeploy/ ; done | |
- name: Run Docker container | |
run: | | |
docker start edirom-online | |
i=0 ; while (! docker inspect edirom-online | grep -e Status....healthy) ; do if ((i > 30)) ; then echo ' **** timeout ... aborting **** ' ; exit 1 ; else sleep 5 ; echo waiting for container ... ; i=$((i+1)) ; fi ; done | |
- name: Run test suite | |
run: ant xqunit-tests | |
- name: Tear down Docker | |
run: docker kill edirom-online | |
update-tag: | |
name: Update git development tag and Github release | |
needs: [build,xqunit,check-language-files] | |
if: ${{ github.event_name == 'push' && github.ref_name == 'develop' }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Delete dev-release | |
run: gh release delete dev --cleanup-tag -y | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPO: ${{ github.event.repository.name }} | |
- name: Download artifact from previous job | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ needs.build.outputs.artifact_name }} | |
path: xars | |
- name: Create dev-release | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: true | |
artifacts: ${{ github.workspace }}/xars/Edirom-Online-*.xar | |
commit: ${{ github.sha }} | |
name: "Development Build" | |
prerelease: true | |
replacesArtifacts: true | |
tag: dev |