Run tests in CI.

Signed-off-by: Daira Emma Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Emma Hopwood 2023-10-19 19:06:19 +01:00
parent f971c8b299
commit 44fc6685a5
2 changed files with 25 additions and 0 deletions

View File

@ -10,6 +10,7 @@ jobs:
- uses: actions/checkout@v2
- name: Install gnome-keyring
# https://github.com/python-poetry/poetry/issues/2692
run: sudo apt-get install gnome-keyring
- name: Install poetry

24
.github/workflows/tests.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: tests
on: pull_request
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install gnome-keyring
# https://github.com/python-poetry/poetry/issues/2692
run: sudo apt-get install gnome-keyring
- name: Install poetry
run: pip install --user poetry
- name: Install dependencies
run: poetry install --no-root
- name: Run tests
# -p '[a-z]*.py' avoids running tests from __init__.py files twice.
run: poetry run python -m unittest discover -s simtfl -t . -p '[a-z]*.py' --verbose --buffer