mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 09:52:37 +02:00

Some checks failed
Large tests / build-container-image (push) Has been cancelled
Large tests / run-large-tests (1) (push) Has been cancelled
Large tests / run-large-tests (10) (push) Has been cancelled
Large tests / run-large-tests (11) (push) Has been cancelled
Large tests / run-large-tests (12) (push) Has been cancelled
Large tests / run-large-tests (14) (push) Has been cancelled
Large tests / run-large-tests (15) (push) Has been cancelled
Large tests / run-large-tests (16) (push) Has been cancelled
Large tests / run-large-tests (17) (push) Has been cancelled
Large tests / run-large-tests (18) (push) Has been cancelled
Large tests / run-large-tests (19) (push) Has been cancelled
Large tests / run-large-tests (2) (push) Has been cancelled
Large tests / run-large-tests (20) (push) Has been cancelled
Large tests / run-large-tests (3) (push) Has been cancelled
Large tests / run-large-tests (4) (push) Has been cancelled
Large tests / run-large-tests (5) (push) Has been cancelled
Large tests / run-large-tests (6) (push) Has been cancelled
Large tests / run-large-tests (7) (push) Has been cancelled
Large tests / run-large-tests (8) (push) Has been cancelled
Large tests / run-large-tests (9) (push) Has been cancelled
Large tests / report (push) Has been cancelled
156 lines
4.7 KiB
YAML
156 lines
4.7 KiB
YAML
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]
|
|
#Bypass the 13th group, since a file in it makes Dangerzone hang.
|
|
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- 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: Smoke test before the party begins
|
|
run: |-
|
|
poetry run ./dev_scripts/dangerzone-cli tests/test_docs/sample-pdf.pdf
|
|
|
|
- name: Run large tests
|
|
continue-on-error: true # We expect test failures
|
|
run: |-
|
|
export TEST_GROUP_COUNT=20
|
|
export TEST_GROUP=${{ matrix.group }}
|
|
poetry run make test-large
|
|
|
|
- name: Show results
|
|
run: |-
|
|
cat tests/test_docs_large/results/junit/*
|
|
|
|
- name: Upload results
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: results-${{ matrix.group }}
|
|
path: tests/test_docs_large/results/junit
|
|
if-no-files-found: error
|
|
retention-days: 1
|
|
|
|
report:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- run-large-tests
|
|
steps:
|
|
- name: Download results
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: ${{ runner.temp }}/results
|
|
pattern: results-*
|
|
merge-multiple: true
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install requirements
|
|
run: |-
|
|
sudo apt update -y
|
|
sudo apt install -y \
|
|
podman git-lfs libxml2-utils \
|
|
python3 python3-poetry make
|
|
poetry install
|
|
|
|
- name: Download the large test repo
|
|
run: |-
|
|
make test-large-init
|
|
|
|
- name: Combine the results
|
|
run: |-
|
|
mkdir -p ${{ runner.temp }}/final_results
|
|
dev_scripts/merge_large_tests_results.py \
|
|
${{ runner.temp }}/results \
|
|
${{ runner.temp }}/final_results/results.xml
|
|
|
|
- name: Generate a report
|
|
run: |-
|
|
poetry run python tests/test_docs_large/report.py \
|
|
${{ runner.temp }}/final_results/results.xml \
|
|
| tee ${{ runner.temp }}/final_results/report.txt
|
|
|
|
- name: Upload final results and report
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: final-results
|
|
path: ${{ runner.temp }}/final_results
|
|
if-no-files-found: error
|