mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
ci: Test building a .deb and installing it
Update our GitHub Actions workflow with the following tests: 1. Build a .deb for Dangerzone on Debian Bookworm. 2. Install this .deb on every Debian-based platform that we support. 3. Test that the installed version runs successfully. This way, we can be sure that .deb that we create on a single Debian version (here we choose Debian Bookworm) works on all platforms. Refs #358
This commit is contained in:
parent
517d3b58f8
commit
3f3d0be2b4
1 changed files with 83 additions and 0 deletions
83
.github/workflows/ci.yml
vendored
83
.github/workflows/ci.yml
vendored
|
@ -41,3 +41,86 @@ jobs:
|
||||||
- run: poetry install
|
- run: poetry install
|
||||||
- name: Run CLI tests
|
- name: Run CLI tests
|
||||||
run: poetry run make test
|
run: poetry run make test
|
||||||
|
|
||||||
|
build-deb:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
target: debian-bookworm
|
||||||
|
distro: debian
|
||||||
|
version: bookworm
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
- name: Build dev environment
|
||||||
|
run: |
|
||||||
|
./dev_scripts/env.py --distro ${{ env.distro }} \
|
||||||
|
--version ${{ env.version }} \
|
||||||
|
build-dev
|
||||||
|
|
||||||
|
- name: Build Dangerzone image
|
||||||
|
run: ./install/linux/build-image.sh
|
||||||
|
|
||||||
|
- name: Build Dangerzone .deb
|
||||||
|
run: |
|
||||||
|
./dev_scripts/env.py --distro ${{ env.distro }} \
|
||||||
|
--version ${{ env.version }} \
|
||||||
|
run --dev ./dangerzone/install/linux/build-deb.py
|
||||||
|
|
||||||
|
- name: Upload Dangerzone .deb
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: dangerzone.deb
|
||||||
|
path: "deb_dist/dangerzone_*_all.deb"
|
||||||
|
|
||||||
|
install-deb:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build-deb
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- target: ubuntu-20.04
|
||||||
|
distro: ubuntu
|
||||||
|
version: "20.04"
|
||||||
|
- target: ubuntu-22.04
|
||||||
|
distro: ubuntu
|
||||||
|
version: "22.04"
|
||||||
|
- target: ubuntu-22.10
|
||||||
|
distro: ubuntu
|
||||||
|
version: "22.10"
|
||||||
|
- target: debian-bullseye
|
||||||
|
distro: debian
|
||||||
|
version: bullseye
|
||||||
|
- target: debian-bookworm
|
||||||
|
distro: debian
|
||||||
|
version: bookworm
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
|
||||||
|
- name: Download Dangerzone .deb
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: dangerzone.deb
|
||||||
|
path: "deb_dist/"
|
||||||
|
|
||||||
|
- name: Create end-user environment on (${{ matrix.target }})
|
||||||
|
run: |
|
||||||
|
./dev_scripts/env.py --distro ${{ matrix.distro }} \
|
||||||
|
--version ${{ matrix.version }} \
|
||||||
|
build
|
||||||
|
|
||||||
|
- name: Run a test command
|
||||||
|
run: |
|
||||||
|
./dev_scripts/env.py --distro ${{ matrix.distro }} \
|
||||||
|
--version ${{ matrix.version }} \
|
||||||
|
run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf
|
||||||
|
|
Loading…
Reference in a new issue