Files
omarchy-pkgs/.github/workflows/test.yml
T

56 lines
1.9 KiB
YAML

name: Tests
# PR-only. Publishing on push has its own workflow and is what verifies the
# merged tree: it resolves every package against the live channel and refuses
# a filename that already exists with different bytes, so two PRs cannot land
# the same version twice. A post-merge test run would only repeat the PR's.
on:
pull_request:
workflow_dispatch:
jobs:
build-isolation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Prepare fixture builder
run: docker build -t omarchy-build-isolation-test -f tests/build-isolation.Dockerfile tests
- name: Verify isolated builds with real pacman transactions
env:
CONTAINER_ENGINE: docker
TEST_BUILDER_IMAGE: omarchy-build-isolation-test
run: tests/build-isolation.sh
self-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
# An Arch container for vercmp: version ordering has to be decided by
# the same comparator pacman uses on users' machines.
- name: Run self-tests
run: |
docker run --rm \
-v "$PWD:/workspace:ro" \
-w /workspace \
archlinux:base-devel bash -lc '
set -euo pipefail
pacman -Syu --noconfirm git jq python libarchive
python tests/upstream-watch.py
./bin/sync-upstream self-test
./bin/sync-rebuilds --self-test
./bin/omarchy-pkgs self-test
./bin/omarchy-release self-test
./tests/partial-release.sh
./tests/published-build-plan.sh
./tests/controller.sh
pacman -S --noconfirm --quiet rclone >/dev/null
./tests/publish-artifact.sh
'