mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
ci: Add CI job for our large tests
This commit is contained in:
parent
919f821885
commit
b115e6b8c5
1 changed files with 89 additions and 0 deletions
89
.github/workflows/large-tests.yml
vendored
Normal file
89
.github/workflows/large-tests.yml
vendored
Normal file
|
@ -0,0 +1,89 @@
|
|||
name: Large tests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "test-large/**"
|
||||
schedule:
|
||||
- cron: "3 0 * * *" # Run every day at 03:00 UTC.
|
||||
workflow_dispatch:
|
||||
|
||||
# Disable multiple concurrent runs on the same branch
|
||||
# When a new CI build is triggered, it will cancel the
|
||||
# other in-progress ones (for the same branch)
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# This is already built daily by the "build.yml" file
|
||||
# But we also want to include this in the checks that run on each push.
|
||||
build-container-image:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get current date
|
||||
id: date
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache container image
|
||||
id: cache-container-image
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: v4-${{ steps.date.outputs.date }}-${{ hashFiles('Dockerfile', 'dangerzone/conversion/*.py', 'dangerzone/container_helpers/*', 'install/common/build-image.py') }}
|
||||
path: |-
|
||||
share/container.tar.gz
|
||||
share/image-id.txt
|
||||
|
||||
- name: Build Dangerzone container image
|
||||
if: ${{ steps.cache-container-image.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
python3 ./install/common/build-image.py
|
||||
|
||||
run-large-tests:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-container-image
|
||||
strategy:
|
||||
matrix:
|
||||
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get current date
|
||||
id: date
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Restore container image
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: v4-${{ steps.date.outputs.date }}-${{ hashFiles('Dockerfile', 'dangerzone/conversion/*.py', 'dangerzone/container_helpers/*', 'install/common/build-image.py') }}
|
||||
path: |-
|
||||
share/container.tar.gz
|
||||
share/image-id.txt
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Install requirements
|
||||
run: |-
|
||||
sudo apt update -y
|
||||
sudo apt install -y \
|
||||
podman git-lfs libxml2-utils \
|
||||
libqt6gui6 libxcb-cursor0 qt6-qpa-plugins \
|
||||
python3 python3-poetry make
|
||||
poetry install
|
||||
|
||||
- name: Run large tests
|
||||
run: |-
|
||||
export TEST_GROUP_COUNT=20
|
||||
export TEST_GROUP=${{ matrix.group }}
|
||||
poetry run make test-large
|
||||
|
||||
- name: Upload results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: results_${{ matrix.group }}
|
||||
path: tests/test_docs_large/results/junit
|
Loading…
Reference in a new issue