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:
deeplow 2023-01-04 15:37:28 +00:00
parent 724dd2a71f
commit a565d9e580
No known key found for this signature in database
GPG key ID: 577982871529A52A
3 changed files with 37 additions and 1 deletions

34
.github/workflows/ci.yml vendored Normal file
View 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

View file

@ -1,4 +1,3 @@
import os
import sys import sys
from pathlib import Path from pathlib import Path

View file

@ -126,6 +126,9 @@ class TestCli(TestBase):
# to tokenize it. # to tokenize it.
args = (args,) 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 # TODO: Replace this with `contextlib.chdir()` [1], which was added in
# Python 3.11. # Python 3.11.
# #