mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
env.py: make env run in GUI mode (--no-gui otherwise)
Now that we have GUI tests, it makes more sense to have running with the X11 socket mounted in the environment than not.
This commit is contained in:
parent
e3a8a651f1
commit
356f835d32
4 changed files with 22 additions and 16 deletions
|
@ -178,7 +178,7 @@ jobs:
|
|||
- run:
|
||||
name: Run CI tests
|
||||
command: |
|
||||
./dev_scripts/env.py --distro ubuntu --version 23.04 run -g --dev \
|
||||
./dev_scripts/env.py --distro ubuntu --version 23.04 run --dev \
|
||||
bash -c 'cd dangerzone; poetry run make test'
|
||||
|
||||
ci-ubuntu-jammy:
|
||||
|
@ -205,7 +205,7 @@ jobs:
|
|||
- run:
|
||||
name: Run CI tests
|
||||
command: |
|
||||
./dev_scripts/env.py --distro ubuntu --version 22.04 run -g --dev \
|
||||
./dev_scripts/env.py --distro ubuntu --version 22.04 run --dev \
|
||||
bash -c 'cd dangerzone; poetry run make test'
|
||||
|
||||
ci-ubuntu-focal:
|
||||
|
@ -232,7 +232,7 @@ jobs:
|
|||
- run:
|
||||
name: Run CI tests
|
||||
command: |
|
||||
./dev_scripts/env.py --distro ubuntu --version 20.04 run -g --dev \
|
||||
./dev_scripts/env.py --distro ubuntu --version 20.04 run --dev \
|
||||
bash -c 'cd dangerzone; poetry run make test'
|
||||
|
||||
ci-fedora-38:
|
||||
|
@ -259,7 +259,7 @@ jobs:
|
|||
- run:
|
||||
name: Run CI tests
|
||||
command: |
|
||||
./dev_scripts/env.py --distro fedora --version 38 run -g --dev \
|
||||
./dev_scripts/env.py --distro fedora --version 38 run --dev \
|
||||
bash -c 'cd dangerzone; poetry run make test'
|
||||
|
||||
ci-fedora-37:
|
||||
|
@ -286,7 +286,7 @@ jobs:
|
|||
- run:
|
||||
name: Run CI tests
|
||||
command: |
|
||||
./dev_scripts/env.py --distro fedora --version 37 run -g --dev \
|
||||
./dev_scripts/env.py --distro fedora --version 37 run --dev \
|
||||
bash -c 'cd dangerzone; poetry run make test'
|
||||
|
||||
ci-debian-trixie:
|
||||
|
@ -313,7 +313,7 @@ jobs:
|
|||
- run:
|
||||
name: Run CI tests
|
||||
command: |
|
||||
./dev_scripts/env.py --distro debian --version trixie run -g --dev \
|
||||
./dev_scripts/env.py --distro debian --version trixie run --dev \
|
||||
bash -c 'cd dangerzone; poetry run make test'
|
||||
|
||||
ci-debian-bookworm:
|
||||
|
@ -340,7 +340,7 @@ jobs:
|
|||
- run:
|
||||
name: Run CI tests
|
||||
command: |
|
||||
./dev_scripts/env.py --distro debian --version bookworm run -g --dev \
|
||||
./dev_scripts/env.py --distro debian --version bookworm run --dev \
|
||||
bash -c 'cd dangerzone; poetry run make test'
|
||||
|
||||
# NOTE: Making CI tests work in Debian Bullseye requires some tip-toeing
|
||||
|
@ -400,7 +400,7 @@ jobs:
|
|||
- run:
|
||||
name: Run CI tests
|
||||
command: |
|
||||
./dev_scripts/env.py --distro debian --version bullseye run -g --dev \
|
||||
./dev_scripts/env.py --distro debian --version bullseye run --dev \
|
||||
bash -c 'cd dangerzone; poetry run make test'
|
||||
|
||||
build-ubuntu-lunar:
|
||||
|
|
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -69,7 +69,7 @@ jobs:
|
|||
run: |
|
||||
./dev_scripts/env.py --distro ${{ env.distro }} \
|
||||
--version ${{ env.version }} \
|
||||
run --dev ./dangerzone/install/linux/build-deb.py
|
||||
run --dev --no-gui ./dangerzone/install/linux/build-deb.py
|
||||
|
||||
- name: Upload Dangerzone .deb
|
||||
uses: actions/upload-artifact@v3
|
||||
|
@ -151,3 +151,9 @@ jobs:
|
|||
./dev_scripts/env.py --distro ${{ matrix.distro }} \
|
||||
--version ${{ matrix.version }} \
|
||||
run dangerzone-cli dangerzone/tests/test_docs/sample-pdf.pdf
|
||||
|
||||
- name: Check that the Dangerzone GUI imports work
|
||||
run: |
|
||||
./dev_scripts/env.py --distro ${{ matrix.distro }} \
|
||||
--version ${{ matrix.version }} \
|
||||
run dangerzone --help
|
||||
|
|
|
@ -7,7 +7,7 @@ import shutil
|
|||
import subprocess
|
||||
import sys
|
||||
|
||||
DEFAULT_GUI = False
|
||||
DEFAULT_GUI = True
|
||||
DEFAULT_USER = "user"
|
||||
DEFAULT_DRY = False
|
||||
DEFAULT_DEV = False
|
||||
|
@ -42,13 +42,13 @@ Run an interactive shell in the development or end-user environment:
|
|||
|
||||
Run Dangerzone in the development environment:
|
||||
|
||||
env.py --distro ubuntu --version 22.04 run --dev --gui bash
|
||||
env.py --distro ubuntu --version 22.04 run --dev bash
|
||||
user@dangerzone-dev:~$ cd dangerzone/
|
||||
user@dangerzone-dev:~$ poetry run ./dev/scripts/dangerzone
|
||||
|
||||
Run Dangerzone in the end-user environment:
|
||||
|
||||
env.py --distro ubuntu --version 22.04 run --gui dangerzone
|
||||
env.py --distro ubuntu --version 22.04 run dangerzone
|
||||
|
||||
"""
|
||||
|
||||
|
@ -566,10 +566,10 @@ def parse_args():
|
|||
)
|
||||
parser_run.set_defaults(func=env_run)
|
||||
parser_run.add_argument(
|
||||
"-g",
|
||||
"--gui",
|
||||
"--no-gui",
|
||||
default=DEFAULT_GUI,
|
||||
action="store_true",
|
||||
action="store_false",
|
||||
dest="gui",
|
||||
help="Run command with GUI support",
|
||||
)
|
||||
parser_run.add_argument(
|
||||
|
|
|
@ -619,7 +619,7 @@ class QABase(abc.ABC):
|
|||
"",
|
||||
f" cd {self.src}",
|
||||
f" ./dev_scripts/env.py --distro {self.DISTRO} --version"
|
||||
f" {self.VERSION} run -g bash",
|
||||
f" {self.VERSION} run bash",
|
||||
"",
|
||||
"and run either `dangerzone` or `dangerzone-cli`",
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue