US08-04: Publish and Deploy from Gitea Actions (#99)
Some checks failed
Test / suites (push) Failing after 2m29s
Some checks failed
Test / suites (push) Failing after 2m29s
This commit was merged in pull request #99.
This commit is contained in:
51
.gitea/workflows/test.yml
Normal file
51
.gitea/workflows/test.yml
Normal file
@@ -0,0 +1,51 @@
|
||||
# The test gate. Deploy waits for this workflow by name (`.gitea/workflows/deploy.yml`
|
||||
# triggers on `workflow_run: [Test]`), so renaming it here without renaming it there
|
||||
# would leave `main` publishing without a suite. `tests/integration/test_deploy_workflows.py`
|
||||
# asserts both halves of that link, and that the commands below are still the ones
|
||||
# configured in `work_item/.work-item.yml`.
|
||||
|
||||
name: Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
# One run per branch; a newer push makes the older run's answer irrelevant.
|
||||
group: test-${{ gitea.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
suites:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install exiftool
|
||||
# The EXIF checkpoints are the safety invariant of every metadata stage; a run
|
||||
# without exiftool would skip them for a reason the release gate accepts.
|
||||
run: |
|
||||
SUDO=
|
||||
if [ "$(id -u)" -ne 0 ]; then SUDO=sudo; fi
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y --no-install-recommends libimage-exiftool-perl
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
|
||||
- name: Install the application and its test dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -e '.[test]'
|
||||
python -m playwright install --with-deps chromium
|
||||
|
||||
- name: Helper suite
|
||||
run: work_item/scripts/python -m unittest discover -s work_item/tests -v
|
||||
|
||||
- name: Application suite
|
||||
run: work_item/scripts/python -m pytest tests -q
|
||||
Reference in New Issue
Block a user