2025-01-04 13:38:27 +00:00
|
|
|
name: Run BaseX Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch: # Enables manual trigger
|
2025-01-04 13:52:28 +00:00
|
|
|
push:
|
2025-01-04 13:38:27 +00:00
|
|
|
branches:
|
|
|
|
- main
|
2025-02-10 21:39:31 +00:00
|
|
|
paths:
|
|
|
|
- '.gitea/workflows/trigger/release'
|
|
|
|
|
|
|
|
|
2025-01-04 13:38:27 +00:00
|
|
|
jobs:
|
2025-01-24 11:10:24 +00:00
|
|
|
test:
|
2025-02-08 23:01:54 +00:00
|
|
|
runs-on: ubuntu-latest
|
2025-01-04 13:38:27 +00:00
|
|
|
steps:
|
2025-01-24 11:10:24 +00:00
|
|
|
- name: Set up Java
|
2025-01-31 21:13:52 +00:00
|
|
|
uses: actions/setup-java@v4
|
2025-01-24 11:10:24 +00:00
|
|
|
with:
|
2025-01-31 21:32:52 +00:00
|
|
|
distribution: 'temurin'
|
2025-01-31 21:13:52 +00:00
|
|
|
java-version: '17'
|
2025-01-24 11:10:24 +00:00
|
|
|
|
2025-02-10 21:39:31 +00:00
|
|
|
- name: Download BaseX
|
2025-01-24 11:10:24 +00:00
|
|
|
run: |
|
2025-02-10 21:39:31 +00:00
|
|
|
BASEX_VERSION="10.7" # Example version (adjust as needed)
|
|
|
|
# Remove dots from version for filename (e.g., "11.7" → "117") "9.7.4","10.7"
|
|
|
|
BASEX_CLEAN_VERSION="${BASEX_VERSION//./}"
|
|
|
|
wget https://files.basex.org/releases/$BASEX_VERSION/BaseX$BASEX_CLEAN_VERSION.zip -O BaseX.zip
|
|
|
|
|
|
|
|
- name: Unzip BaseX
|
|
|
|
run: |
|
|
|
|
unzip BaseX107.zip -d $HOME
|
|
|
|
rm BaseX.zip
|
|
|
|
|
|
|
|
- name: Add BaseX to PATH
|
|
|
|
run: |
|
|
|
|
echo "BASEX_ROOT=$HOME/basex" >> $GITHUB_ENV
|
|
|
|
echo "PATH=$PATH:$HOME/basex/bin" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Verify BaseX installation
|
2025-01-31 22:19:15 +00:00
|
|
|
run: |
|
2025-02-02 10:53:49 +00:00
|
|
|
basex -c "SHOW OPTIONS"
|
2025-01-31 22:24:58 +00:00
|
|
|
|
2025-01-31 21:29:05 +00:00
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v4
|
2025-02-10 21:39:31 +00:00
|
|
|
with:
|
|
|
|
ref: main
|
|
|
|
|
2025-01-31 21:29:05 +00:00
|
|
|
- name: Build package
|
|
|
|
run: |
|
2025-02-10 17:17:30 +00:00
|
|
|
basex scripts/make-xar.xq
|
|
|
|
basex scripts/repo-install.xq
|
2025-02-03 14:15:01 +00:00
|
|
|
|
2025-02-10 21:39:31 +00:00
|
|
|
- name: Run tests
|
2025-02-02 16:46:03 +00:00
|
|
|
run: |
|
2025-02-02 18:15:08 +00:00
|
|
|
basex -Wt src/test
|
2025-02-10 21:39:31 +00:00
|
|
|
|
2025-02-02 16:46:03 +00:00
|
|
|
|