Update testing instructions #1837
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pdfarranger | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
PDFARRANGER_COVERAGE: 1 | |
steps: | |
- run: sudo apt-get update | |
- name: Install APT packages | |
run: sudo apt-get -y install gettext appstream python3-dogtail desktop-file-utils xvfb gir1.2-poppler-0.18 | |
- uses: actions/checkout@v4 | |
- name: Upgrade pip | |
run: pip install --upgrade pip | |
- name: Install | |
run: pip3 install -v --upgrade .[image] coverage | |
- name: AppStream | |
run: appstreamcli validate $HOME/.local/share/metainfo/com.github.jeromerobert.pdfarranger.metainfo.xml | |
- name: Validate Desktop File | |
run: desktop-file-validate $HOME/.local/share/applications/com.github.jeromerobert.pdfarranger.desktop | |
- name: Dogtail Tests and Coverage | |
run: python3 -X tracemalloc -u -m unittest -v -f tests.test | |
- name: Exporter Tests and Coverage | |
run: python3 -m coverage run --data-file=.coverage.exporter -m unittest -v -f tests.test_exporter | |
- name: Core Tests and Coverage | |
run: python3 -m coverage run --data-file=.coverage.core -m unittest -v -f tests.test_core | |
# Convert to lcov because it's compatible with codecov AND can be combine | |
- name: Convert to lcov | |
run: python3 -m coverage combine && python3 -m coverage lcov | |
# Upload for later use (see upload-to-codecov job) | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ppp-lcov | |
path: coverage.lcov | |
build-pikepdf-6: | |
runs-on: ubuntu-latest | |
# PikePDF 6.0.1 | |
container: jeromerobert/pdfarranger-docker-ci:1.5.0 | |
env: | |
PDFARRANGER_COVERAGE: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install | |
run: pip3 install -v .[image] | |
- name: Dogtail Tests and Coverage | |
run: python3 -X tracemalloc -u -m unittest -v -f tests.test | |
- name: Exporter Tests and Coverage | |
run: python3 -m coverage run --data-file=.coverage.exporter -m unittest -v -f tests.test_exporter | |
- name: Core Tests and Coverage | |
run: python3 -m coverage run --data-file=.coverage.core -m unittest -v -f tests.test_core | |
- name: Convert to lcov | |
run: python3 -m coverage combine && python3 -m coverage lcov | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pp6-lcov | |
path: coverage.lcov | |
upload-to-codecov: | |
# Upload to a codecov in a dedicated job to avoid races | |
needs: [build, build-pikepdf-6] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install lcov | |
run: sudo apt-get -y install lcov | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Combine Coverage | |
run: lcov -a ppp-lcov/coverage.lcov -a pp6-lcov/coverage.lcov -o lcov.info | |
- name: Upload to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
build-win32: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/pdfarranger/wine-mingw64:1.10.0 | |
options: --user root | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ./setup.py build -v | |
- run: HOME=/root wine python setup_win32.py bdist_msi | |
- run: HOME=/root wine python setup_win32.py bdist_zip | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pdfarranger-windows-installer-msi | |
path: dist/*.msi | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pdfarranger-windows-portable-zip | |
path: dist/*.zip | |
rpmbuild: | |
runs-on: ubuntu-latest | |
container: dreua/pdfarranger-docker-rpm | |
steps: | |
- name: RPM Build | |
run: /pdfarranger/pdfarranger-build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pdfarranger-fedora-testbuild | |
path: /github/home/rpmbuild/**/*.rpm |