Skip to content

chore(deps): bump undici and @actions/http-client #400

chore(deps): bump undici and @actions/http-client

chore(deps): bump undici and @actions/http-client #400

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: compile and test
on:
push:
# branches-ignore:
# - 'ref/pull/**'
workflow_dispatch:
# concurrency:
# group: lint-${{ github.event.pull_request.number || github.sha }}
# cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
# 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
# Checkout code fetch-depth significantly impacts performance
- uses: actions/checkout@v6
with:
fetch-depth: 1
# TODO(DP) Validate ?
- name: Ensure all XML files are well-formed
run: |
xmllint --noout \
$(find . -type f -name '*.xml')
# Lint commit messages
- name: lint commit message
uses: wagoid/commitlint-github-action@v6
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
exist-version: [latest, release]
java-version: [11, 21]
exclude:
- exist-version: release
java-version: 21
- exist-version: latest
java-version: 11
steps:
- name: Checkout (sparse)
uses: actions/checkout@v6
with:
fetch-depth: 1
- 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: upload xar package
if: ${{ matrix.java-version == 21 }}
uses: actions/upload-artifact@v7
with:
name: frus-xar
path: build/*.xar
if-no-files-found: ignore
- name: upload smoke test
if: ${{ matrix.java-version == 21 }}
uses: actions/upload-artifact@v7
with:
name: frus-bats
path: tests/bats/
if-no-files-found: ignore
test:
runs-on: ubuntu-latest
needs: [build, lint]
strategy:
fail-fast: false
matrix:
# 7.0.0-SNAPSHOT and 6.2.1 created
exist-version: [release]
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
build-mount-path: /var/lib/docker/
root-reserve-mb: 2048
temp-reserve-mb: 512
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
remove-codeql: "true"
remove-docker-images: "true"
- name: Configure containerd and Docker for LVM storage
run: |
sudo mkdir -p /var/lib/docker/containerd
sudo mkdir -p /etc/containerd
# Ensure containerd uses LVM-backed path for image storage
echo 'root = "/var/lib/docker/containerd"' | sudo tee /etc/containerd/config.toml
# Limit Docker container logs
echo '{"log-driver":"json-file","log-opts":{"max-size":"10m","max-file":"3"}}' | sudo tee /etc/docker/daemon.json
- name: Restart docker
run: sudo service docker restart
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- 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 bats
- name: create folders
run: |
mkdir build
mkdir -p tests/bats
- uses: actions/download-artifact@v8
with:
name: frus-xar
path: build
- uses: actions/download-artifact@v8
with:
name: frus-bats
path: tests/bats
# Copy artifact to LVM volume so autodeploy mount has xar (avoids root pressure)
- name: Stage build artifact on LVM volume
run: |
sudo mkdir -p /var/lib/docker/build-artifacts
sudo cp -a build/. /var/lib/docker/build-artifacts/
# sanity check
- name: check os
run: |
df -h /var/lib/docker
df -ih /var/lib/docker
- name: Check config
run: docker info
# Install
# Both autodeploy (xar) and data dir are on LVM (/var/lib/docker) to avoid root space limits
- name: Start exist-ci containers
run: |
sudo mkdir -p /var/lib/docker/exist-data
docker run -dit -p 8080:8080 \
-v /var/lib/docker/build-artifacts:/exist/autodeploy \
-v /var/lib/docker/exist-data:/exist/data \
--name exist --rm \
duncdrum/existdb:${{ matrix.exist-version }}
- name: wait for install to finish
timeout-minutes: 30
run: |
while ! docker logs exist | grep -q "Server has started"; \
do sleep 2s; \
done
# DEBUGGING
- name: grab container logs
if: always()
run: docker cp exist:/exist/logs .
- uses: actions/upload-artifact@v7
if: always()
with:
name: exist_${{ matrix.exist-version }}_logs
path: logs/
if-no-files-found: ignore
- name: cleanup logs folder
if: always()
run: rm -rf ./logs
# Test
- name: Run test
run: bats --tap tests/bats/*.bats
release:
name: Release
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- 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