Skip to content

chore(gha): bump actions/checkout from 5 to 6 #420

chore(gha): bump actions/checkout from 5 to 6

chore(gha): bump actions/checkout from 5 to 6 #420

Workflow file for this run

# This workflow builds a xar archive, deploys it into exist and execute a simple smoke test.
# It also includes code for using semantic-release to upload packages as part of GitHub releases
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# For node free automated release see https://trstringer.com/github-actions-create-release-upload-artifacts/
name: exist-db CI
on: [push]
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '22'
- run: npm install
# Run the commitlint action, considering its own dependencies and yours as well 🚀
# `github.workspace` is the path to your repository.
- uses: wagoid/commitlint-github-action@v6
env:
NODE_PATH: ${{ github.workspace }}/node_modules
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# 7.0.0-SNAPSHOT and 6.2.1 created
exist-version: [latest, release]
java-version: [11, 21]
exclude:
- exist-version: release
java-version: 21
- exist-version: latest
java-version: 11
steps:
# Checkout code
- uses: actions/checkout@v6
- name: Install Test Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils bats
# sanity check
# TODO(DP) Validate ?
- name: Ensure all XML files are well-formed
run: |
find . -type f -name '*.xml' -print0 | xargs -0 xmllint -noout
# Build
- name: Setup Node.js
uses: actions/setup-node@v6
with:
cache: npm
node-version: lts/*
- name: Build Expath Package
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- run: ant -Dapp.version=1.0.0-SNAPSHOT
- name: Add expath dependencies
working-directory: build
run: |
wget https://exist-db.org/exist/apps/public-repo/public/expath-crypto-module-6.0.1.xar -O 000.xar
wget http://exist-db.org/exist/apps/public-repo/public/templating-1.1.0.xar -O 001.xar
wget https://exist-db.org/exist/apps/public-repo/public/tei-publisher-lib-2.10.1.xar -O 002.xar
wget https://exist-db.org/exist/apps/public-repo/public/functx-1.0.1.xar -O 003.xar
wget https://github.com/HistoryAtState/aws.xq/releases/latest/download/aws-xq.xar -O 004.xar
# Install
- name: Start exist-ci containers
run: |
docker run -dit -p 8080:8080 -v ${{ github.workspace }}/build:/exist/autodeploy \
--name exist --rm --health-interval=2s --health-start-period=4s \
duncdrum/existdb:${{ matrix.exist-version }}
- name: wait for install to finish
timeout-minutes: 10
run: |
while ! docker logs exist | grep -q "Server has started"; \
do sleep 2s; \
done
# Test
- name: Run smoke test
run: bats --tap tests/bats/*.bats
release:
name: Release
runs-on: ubuntu-latest
needs:
- commitlint
- build
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
- name: Setup Node.js
uses: actions/setup-node@v6
with:
cache: npm
node-version: lts/*
- name: Install dependencies
run: npm ci --no-optional
- name: Perform Release
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
run: npx semantic-release
# TODO(DP):
# - publish to public repo?