Skip to content

fix: sync workspace items from Magda's local #34

fix: sync workspace items from Magda's local

fix: sync workspace items from Magda's local #34

Workflow file for this run

# This workflow builds a xar archive, deploys it into exist and execute a simple smoke test.
name: Test
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
# 6.4.0 created
exist-version: [release, latest]
steps:
# Checkout code
- uses: actions/checkout@v5
# Speed up apt-get installs
- name: Disable man-db to make package install and removal faster
run: |
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
sudo dpkg-reconfigure man-db
- name: Install Test Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils bats
# sanity check
- name: Ensure all XML files are well-formed
run: |
xmllint --noout \
$(find . -type f -name '*.xml')
# Build
- name: Install Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 22
- run: ant -Dapp.version=1.0.0
- name: Check Contents
working-directory: build/
run: ls
# Install
- name: Start exist-ci containers
run: |
docker run -dit -p 8080:8080 -v ${{ github.workspace }}/build:/exist/autodeploy \
--name exist --rm --health-interval=1s --health-start-period=1s \
duncdrum/existdb:${{ matrix.exist-version }}
- name: Wait for server to start
timeout-minutes: 1
run: |
echo "Waiting for server to start..."
until docker logs exist 2>&1 | grep -q "Server has started"; do
echo "Still waiting..."
sleep 8
done
# Test
- name: Run smoke test
run: bats --tap test/*.bats
- name: debug logs
if: failure()
run: docker logs exist | grep 'ERROR'
- name: Copy logs on failure
if: failure()
run: |
echo "Copying logs..."
docker cp exist:/exist/logs/exist.log ./exist.log
- name: Upload logs artifact
if: failure()
uses: actions/upload-artifact@v4
with:
name: edep-data-exist-${{ matrix.exist-version }}-log
path: exist.log