REMOVE ME: Silence some tests

This commit is contained in:
Alex Pyrgiotis 2025-05-07 19:17:04 +03:00
parent b54f347b80
commit 1b36193a18
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA
2 changed files with 345 additions and 345 deletions

View file

@ -26,21 +26,21 @@ concurrency:
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
run-lint: #run-lint:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
container: # container:
image: debian:bookworm # image: debian:bookworm
steps: # steps:
- uses: actions/checkout@v4 # - uses: actions/checkout@v4
- name: Install dev. dependencies # - name: Install dev. dependencies
run: |- # run: |-
apt-get update # apt-get update
apt-get install -y git make python3 python3-poetry --no-install-recommends # apt-get install -y git make python3 python3-poetry --no-install-recommends
poetry install --only lint,test # poetry install --only lint,test
- name: Run linters to enforce code style # - name: Run linters to enforce code style
run: poetry run make lint # run: poetry run make lint
- name: Check that the QA script is up to date with the docs # - name: Check that the QA script is up to date with the docs
run: "./dev_scripts/qa.py --check-refs" # run: "./dev_scripts/qa.py --check-refs"
# This is already built daily by the "build.yml" file # 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. # But we also want to include this in the checks that run on each push.
@ -116,353 +116,353 @@ jobs:
if-no-files-found: error if-no-files-found: error
compression-level: 0 compression-level: 0
macOS: #macOS:
name: "macOS (${{ matrix.arch }})" # name: "macOS (${{ matrix.arch }})"
runs-on: ${{ matrix.runner }} # runs-on: ${{ matrix.runner }}
strategy: # strategy:
matrix: # matrix:
include: # include:
- runner: macos-latest # CPU type: Apple Silicon (M1) # - runner: macos-latest # CPU type: Apple Silicon (M1)
arch: arch64 # arch: arch64
- runner: macos-13 # CPU type: Intel x86_64 # - runner: macos-13 # CPU type: Intel x86_64
arch: x86_64 # arch: x86_64
env: # env:
DUMMY_CONVERSION: 1 # DUMMY_CONVERSION: 1
steps: # steps:
- uses: actions/checkout@v4 # - uses: actions/checkout@v4
- uses: actions/setup-python@v5 # - uses: actions/setup-python@v5
with: # with:
python-version: "3.12" # python-version: "3.12"
- run: pip install poetry # - run: pip install poetry
- run: poetry install # - run: poetry install
- name: Cache inventory # - name: Cache inventory
id: cache-inventory # id: cache-inventory
uses: actions/cache@v4 # uses: actions/cache@v4
with: # with:
path: share/tessdata/ # path: share/tessdata/
key: v1-inventory-darwin-${{ matrix.arch }}-${{ hashFiles('./inventory.lock') }} # key: v1-inventory-darwin-${{ matrix.arch }}-${{ hashFiles('./inventory.lock') }}
- name: Sync inventory # - name: Sync inventory
if: steps.cache-inventory.outputs.cache-hit != 'true' # if: steps.cache-inventory.outputs.cache-hit != 'true'
run: poetry run python3 ./dev_scripts/inventory.py sync # run: poetry run python3 ./dev_scripts/inventory.py sync
- name: Run CLI tests # - name: Run CLI tests
run: poetry run make test # run: poetry run make test
- name: Build macOS app # - name: Build macOS app
run: poetry run python ./install/macos/build-app.py # run: poetry run python ./install/macos/build-app.py
- name: Upload macOS app # - name: Upload macOS app
uses: actions/upload-artifact@v4 # uses: actions/upload-artifact@v4
with: # with:
name: Dangerzone-${{ matrix.arch }}.app # name: Dangerzone-${{ matrix.arch }}.app
path: "dist/Dangerzone.app" # path: "dist/Dangerzone.app"
if-no-files-found: error # if-no-files-found: error
compression-level: 0 # compression-level: 0
build-deb: #build-deb:
needs: # needs:
- build-container-image # - build-container-image
name: "build-deb (${{ matrix.distro }} ${{ matrix.version }})" # name: "build-deb (${{ matrix.distro }} ${{ matrix.version }})"
runs-on: ubuntu-latest # runs-on: ubuntu-latest
strategy: # strategy:
matrix: # matrix:
include: # include:
- distro: ubuntu # - distro: ubuntu
version: "22.04" # version: "22.04"
- distro: ubuntu # - distro: ubuntu
version: "24.04" # version: "24.04"
- distro: ubuntu # - distro: ubuntu
version: "24.10" # version: "24.10"
- distro: ubuntu # - distro: ubuntu
version: "25.04" # version: "25.04"
- distro: debian # - distro: debian
version: bullseye # version: bullseye
- distro: debian # - distro: debian
version: bookworm # version: bookworm
- distro: debian # - distro: debian
version: trixie # version: trixie
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v4 # uses: actions/checkout@v4
- uses: actions/setup-python@v5 # - uses: actions/setup-python@v5
with: # with:
python-version: "3.11" # python-version: "3.11"
- name: Login to GHCR # - name: Login to GHCR
run: | # run: |
echo ${{ github.token }} | podman login ghcr.io -u USERNAME --password-stdin # echo ${{ github.token }} | podman login ghcr.io -u USERNAME --password-stdin
- name: Get the dev environment # - name: Get the dev environment
run: | # run: |
./dev_scripts/env.py \ # ./dev_scripts/env.py \
--distro ${{ matrix.distro }} \ # --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \ # --version ${{ matrix.version }} \
build-dev --sync # build-dev --sync
- name: Get current date # - name: Get current date
id: date # id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT # run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Restore container cache # - name: Restore container cache
uses: actions/cache/restore@v4 # uses: actions/cache/restore@v4
with: # with:
key: v5-${{ steps.date.outputs.date }}-${{ hashFiles('Dockerfile', 'dangerzone/conversion/*.py', 'dangerzone/container_helpers/*', 'install/common/build-image.py') }} # key: v5-${{ steps.date.outputs.date }}-${{ hashFiles('Dockerfile', 'dangerzone/conversion/*.py', 'dangerzone/container_helpers/*', 'install/common/build-image.py') }}
path: |- # path: |-
share/container.tar # share/container.tar
share/image-id.txt # share/image-id.txt
fail-on-cache-miss: true # fail-on-cache-miss: true
- name: Build Dangerzone .deb # - name: Build Dangerzone .deb
run: | # run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} \ # ./dev_scripts/env.py --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \ # --version ${{ matrix.version }} \
run --dev --no-gui ./dangerzone/install/linux/build-deb.py # run --dev --no-gui ./dangerzone/install/linux/build-deb.py
- name: Upload Dangerzone .deb # - name: Upload Dangerzone .deb
if: matrix.distro == 'debian' && matrix.version == 'bookworm' # if: matrix.distro == 'debian' && matrix.version == 'bookworm'
uses: actions/upload-artifact@v4 # uses: actions/upload-artifact@v4
with: # with:
name: dangerzone.deb # name: dangerzone.deb
path: "deb_dist/dangerzone_*_*.deb" # path: "deb_dist/dangerzone_*_*.deb"
if-no-files-found: error # if-no-files-found: error
compression-level: 0 # compression-level: 0
install-deb: #install-deb:
name: "install-deb (${{ matrix.distro }} ${{ matrix.version }})" # name: "install-deb (${{ matrix.distro }} ${{ matrix.version }})"
runs-on: ubuntu-latest # runs-on: ubuntu-latest
needs: # needs:
- build-deb # - build-deb
strategy: # strategy:
matrix: # matrix:
include: # include:
- distro: ubuntu # - distro: ubuntu
version: "22.04" # version: "22.04"
- distro: ubuntu # - distro: ubuntu
version: "24.04" # version: "24.04"
- distro: ubuntu # - distro: ubuntu
version: "24.10" # version: "24.10"
- distro: ubuntu # - distro: ubuntu
version: "25.04" # version: "25.04"
- distro: debian # - distro: debian
version: bullseye # version: bullseye
- distro: debian # - distro: debian
version: bookworm # version: bookworm
- distro: debian # - distro: debian
version: trixie # version: trixie
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v4 # uses: actions/checkout@v4
- uses: actions/setup-python@v5 # - uses: actions/setup-python@v5
with: # with:
python-version: "3.10" # python-version: "3.10"
- name: Download Dangerzone .deb # - name: Download Dangerzone .deb
uses: actions/download-artifact@v4 # uses: actions/download-artifact@v4
with: # with:
name: dangerzone.deb # name: dangerzone.deb
path: "deb_dist/" # path: "deb_dist/"
- name: Build end-user environment # - name: Build end-user environment
run: | # run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} \ # ./dev_scripts/env.py --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \ # --version ${{ matrix.version }} \
build # build
- name: Run a test command # - name: Run a test command
run: | # run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} \ # ./dev_scripts/env.py --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \ # --version ${{ matrix.version }} \
run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf --ocr-lang eng # run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf --ocr-lang eng
- name: Check that the Dangerzone GUI imports work # - name: Check that the Dangerzone GUI imports work
run: | # run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} \ # ./dev_scripts/env.py --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \ # --version ${{ matrix.version }} \
run dangerzone --help # run dangerzone --help
build-install-rpm: #build-install-rpm:
name: "build-install-rpm (${{ matrix.distro }} ${{matrix.version}})" # name: "build-install-rpm (${{ matrix.distro }} ${{matrix.version}})"
runs-on: ubuntu-latest # runs-on: ubuntu-latest
needs: # needs:
- build-container-image # - build-container-image
strategy: # strategy:
matrix: # matrix:
distro: ["fedora"] # distro: ["fedora"]
version: ["40", "41", "42"] # version: ["40", "41", "42"]
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v4 # uses: actions/checkout@v4
- name: Login to GHCR # - name: Login to GHCR
run: | # run: |
echo ${{ github.token }} | podman login ghcr.io -u USERNAME --password-stdin # echo ${{ github.token }} | podman login ghcr.io -u USERNAME --password-stdin
- name: Get the dev environment # - name: Get the dev environment
run: | # run: |
./dev_scripts/env.py \ # ./dev_scripts/env.py \
--distro ${{ matrix.distro }} \ # --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \ # --version ${{ matrix.version }} \
build-dev --sync # build-dev --sync
- name: Get current date # - name: Get current date
id: date # id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT # run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Restore container image # - name: Restore container image
uses: actions/cache/restore@v4 # uses: actions/cache/restore@v4
with: # with:
key: v5-${{ steps.date.outputs.date }}-${{ hashFiles('Dockerfile', 'dangerzone/conversion/*.py', 'dangerzone/container_helpers/*', 'install/common/build-image.py') }} # key: v5-${{ steps.date.outputs.date }}-${{ hashFiles('Dockerfile', 'dangerzone/conversion/*.py', 'dangerzone/container_helpers/*', 'install/common/build-image.py') }}
path: |- # path: |-
share/container.tar # share/container.tar
share/image-id.txt # share/image-id.txt
fail-on-cache-miss: true # fail-on-cache-miss: true
- name: Build Dangerzone .rpm # - name: Build Dangerzone .rpm
run: | # run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} --version ${{ matrix.version }} \ # ./dev_scripts/env.py --distro ${{ matrix.distro }} --version ${{ matrix.version }} \
run --dev --no-gui ./dangerzone/install/linux/build-rpm.py # run --dev --no-gui ./dangerzone/install/linux/build-rpm.py
- name: Upload Dangerzone .rpm # - name: Upload Dangerzone .rpm
uses: actions/upload-artifact@v4 # uses: actions/upload-artifact@v4
with: # with:
name: dangerzone-${{ matrix.distro }}-${{ matrix.version }}.rpm # name: dangerzone-${{ matrix.distro }}-${{ matrix.version }}.rpm
path: "dist/dangerzone-*.x86_64.rpm" # path: "dist/dangerzone-*.x86_64.rpm"
if-no-files-found: error # if-no-files-found: error
compression-level: 0 # compression-level: 0
# Reclaim some space in this step, now that the dev environment is no # # Reclaim some space in this step, now that the dev environment is no
# longer necessary. Previously, we encountered out-of-space issues while # # longer necessary. Previously, we encountered out-of-space issues while
# running this CI job. # # running this CI job.
- name: Reclaim some storage space # - name: Reclaim some storage space
run: podman system reset -f # run: podman system reset -f
- name: Build end-user environment # - name: Build end-user environment
run: | # run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} \ # ./dev_scripts/env.py --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \ # --version ${{ matrix.version }} \
build # build
- name: Run a test command # - name: Run a test command
run: | # run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} --version ${{ matrix.version }} \ # ./dev_scripts/env.py --distro ${{ matrix.distro }} --version ${{ matrix.version }} \
run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf --ocr-lang eng # run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf --ocr-lang eng
- name: Check that the Dangerzone GUI imports work # - name: Check that the Dangerzone GUI imports work
run: | # run: |
./dev_scripts/env.py --distro ${{ matrix.distro }} --version ${{ matrix.version }} \ # ./dev_scripts/env.py --distro ${{ matrix.distro }} --version ${{ matrix.version }} \
run dangerzone --help # run dangerzone --help
run-tests: #run-tests:
name: "run tests (${{ matrix.distro }} ${{ matrix.version }})" # name: "run tests (${{ matrix.distro }} ${{ matrix.version }})"
runs-on: ubuntu-latest # runs-on: ubuntu-latest
needs: # needs:
- build-container-image # - build-container-image
strategy: # strategy:
matrix: # matrix:
include: # include:
- distro: ubuntu # - distro: ubuntu
version: "22.04" # version: "22.04"
- distro: ubuntu # - distro: ubuntu
version: "24.04" # version: "24.04"
- distro: ubuntu # - distro: ubuntu
version: "24.10" # version: "24.10"
- distro: ubuntu # - distro: ubuntu
version: "25.04" # version: "25.04"
- distro: debian # - distro: debian
version: bullseye # version: bullseye
- distro: debian # - distro: debian
version: bookworm # version: bookworm
- distro: debian # - distro: debian
version: trixie # version: trixie
- distro: fedora # - distro: fedora
version: "40" # version: "40"
- distro: fedora # - distro: fedora
version: "41" # version: "41"
- distro: fedora # - distro: fedora
version: "42" # version: "42"
steps: # steps:
- name: Checkout # - name: Checkout
uses: actions/checkout@v4 # uses: actions/checkout@v4
- uses: actions/setup-python@v5 # - uses: actions/setup-python@v5
with: # with:
python-version: "3.11" # python-version: "3.11"
- name: Install inventory dependencies # - name: Install inventory dependencies
run: | # run: |
sudo apt install pipx # sudo apt install pipx
pipx install poetry # pipx install poetry
poetry install # poetry install
- name: Cache inventory # - name: Cache inventory
id: cache-inventory # id: cache-inventory
uses: actions/cache@v4 # uses: actions/cache@v4
with: # with:
path: share/tessdata/ # path: share/tessdata/
key: v1-inventory-linux-${{ hashFiles('./inventory.lock') }} # key: v1-inventory-linux-${{ hashFiles('./inventory.lock') }}
- name: Sync inventory # - name: Sync inventory
if: steps.cache-inventory.outputs.cache-hit != 'true' # if: steps.cache-inventory.outputs.cache-hit != 'true'
run: poetry run python3 ./dev_scripts/inventory.py sync # run: poetry run python3 ./dev_scripts/inventory.py sync
- name: Login to GHCR # - name: Login to GHCR
run: | # run: |
echo ${{ github.token }} | podman login ghcr.io -u USERNAME --password-stdin # echo ${{ github.token }} | podman login ghcr.io -u USERNAME --password-stdin
- name: Get current date # - name: Get current date
id: date # id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT # run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Get the dev environment # - name: Get the dev environment
run: | # run: |
./dev_scripts/env.py \ # ./dev_scripts/env.py \
--distro ${{ matrix.distro }} \ # --distro ${{ matrix.distro }} \
--version ${{ matrix.version }} \ # --version ${{ matrix.version }} \
build-dev --sync # build-dev --sync
- name: Restore container image # - name: Restore container image
uses: actions/cache/restore@v4 # uses: actions/cache/restore@v4
with: # with:
key: v5-${{ steps.date.outputs.date }}-${{ hashFiles('Dockerfile', 'dangerzone/conversion/*.py', 'dangerzone/container_helpers/*', 'install/common/build-image.py') }} # key: v5-${{ steps.date.outputs.date }}-${{ hashFiles('Dockerfile', 'dangerzone/conversion/*.py', 'dangerzone/container_helpers/*', 'install/common/build-image.py') }}
path: |- # path: |-
share/container.tar # share/container.tar
share/image-id.txt # share/image-id.txt
fail-on-cache-miss: true # fail-on-cache-miss: true
- name: Setup xvfb (Linux) # - name: Setup xvfb (Linux)
run: | # run: |
sudo apt update # sudo apt update
# Stuff copied wildly from several stackoverflow posts # # Stuff copied wildly from several stackoverflow posts
sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 libxcb-shape0 libglib2.0-0 libgl1-mesa-dev '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev # sudo apt-get install -y xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xinput0 libxcb-xfixes0 libxcb-shape0 libglib2.0-0 libgl1-mesa-dev '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
# start xvfb in the background # # start xvfb in the background
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 & # sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
- name: Run CI tests # - name: Run CI tests
run: |- # run: |-
# Pass the -ac Xserver flag, to disable host-based access controls. # # Pass the -ac Xserver flag, to disable host-based access controls.
# This should be used ONLY for testing [1]. If we don't pass this # # This should be used ONLY for testing [1]. If we don't pass this
# flag, the Podman container is not authorized [2] to access the Xvfb # # flag, the Podman container is not authorized [2] to access the Xvfb
# server. # # server.
# # #
# [1] From https://www.x.org/releases/X11R6.7.0/doc/Xserver.1.html#sect4: # # [1] From https://www.x.org/releases/X11R6.7.0/doc/Xserver.1.html#sect4:
# # #
# disables host-based access control mechanisms. Enables access by # # disables host-based access control mechanisms. Enables access by
# any host, and permits any host to modify the access control # # any host, and permits any host to modify the access control
# list. Use with extreme caution. This option exists primarily for # # list. Use with extreme caution. This option exists primarily for
# running test suites remotely. # # running test suites remotely.
# # #
# [2] Fails with "Authorization required, but no authorization # # [2] Fails with "Authorization required, but no authorization
# protocol specified". However, we have verified with strace(1) # # protocol specified". However, we have verified with strace(1)
# that the command in the Podman container can read the Xauthority # # that the command in the Podman container can read the Xauthority
# file successfully. # # file successfully.
xvfb-run -s '-ac' ./dev_scripts/env.py --distro ${{ matrix.distro }} --version ${{ matrix.version }} run --dev \ # xvfb-run -s '-ac' ./dev_scripts/env.py --distro ${{ matrix.distro }} --version ${{ matrix.version }} run --dev \
bash -c 'cd dangerzone; poetry run make test' # bash -c 'cd dangerzone; poetry run make test'
- name: Upload PDF diffs # - name: Upload PDF diffs
uses: actions/upload-artifact@v4 # uses: actions/upload-artifact@v4
with: # with:
name: pdf-diffs-${{ matrix.distro }}-${{ matrix.version }} # name: pdf-diffs-${{ matrix.distro }}-${{ matrix.version }}
path: tests/test_docs/diffs/*.jpeg # path: tests/test_docs/diffs/*.jpeg
# Always run this step to publish test results, even on failures # # Always run this step to publish test results, even on failures
if: ${{ always() }} # if: ${{ always() }}

View file

@ -1,22 +1,22 @@
name: Release multi-arch container image #name: Release multi-arch container image
on: #on:
workflow_dispatch: # workflow_dispatch:
push: # push:
branches: # branches:
- main # - main
- "test/**" # - "test/**"
schedule: # schedule:
- cron: "0 0 * * *" # Run every day at 00:00 UTC. # - cron: "0 0 * * *" # Run every day at 00:00 UTC.
jobs: #jobs:
build-push-image: # build-push-image:
uses: ./.github/workflows/build-push-image.yml # uses: ./.github/workflows/build-push-image.yml
with: # with:
registry: ghcr.io/${{ github.repository_owner }} # registry: ghcr.io/${{ github.repository_owner }}
registry_user: ${{ github.actor }} # registry_user: ${{ github.actor }}
image_name: dangerzone/dangerzone # image_name: dangerzone/dangerzone
reproduce: true # reproduce: true
secrets: # secrets:
registry_token: ${{ secrets.GITHUB_TOKEN }} # registry_token: ${{ secrets.GITHUB_TOKEN }}