mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
CI: add macOS and Winwdows tests via Github Actions
Adds tests for macOS and Windows with the dummy converter. Tests won't actually perform the conversion. But it should be enough for us to test the remainder of the codebase. Fixes #229
This commit is contained in:
parent
724dd2a71f
commit
a565d9e580
3 changed files with 37 additions and 1 deletions
34
.github/workflows/ci.yml
vendored
Normal file
34
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Tests
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
DUMMY_CONVERSION: True
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- run: pip install poetry
|
||||
- run: poetry install
|
||||
- name: Run CLI tests
|
||||
run: poetry run make test
|
||||
|
||||
macOS:
|
||||
runs-on: macos-latest
|
||||
env:
|
||||
DUMMY_CONVERSION: True
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- run: pip install poetry
|
||||
- run: poetry install
|
||||
- name: Run CLI tests
|
||||
run: poetry run make test
|
|
@ -1,4 +1,3 @@
|
|||
import os
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
|
|
@ -126,6 +126,9 @@ class TestCli(TestBase):
|
|||
# to tokenize it.
|
||||
args = (args,)
|
||||
|
||||
if os.environ.get("DUMMY_CONVERSION", False):
|
||||
args = ("--unsafe-dummy-conversion", *args)
|
||||
|
||||
# TODO: Replace this with `contextlib.chdir()` [1], which was added in
|
||||
# Python 3.11.
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue