Skip to content

Fix/441 Fail if no language is set #154

Fix/441 Fail if no language is set

Fix/441 Fail if no language is set #154

Workflow file for this run

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
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: debug
run: ls -laR ${{ github.workspace }}
- 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]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Delete dev-release
if: ${{ github.event_name == 'push' && github.ref_name == 'develop' }}
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
if: ${{ github.event_name == 'push' && github.ref_name == 'develop' }}
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