Skip to content

Commit

Permalink
Run python tests in CI
Browse files Browse the repository at this point in the history
Run the pytest module also in the CI and adjust the test requirements.
  • Loading branch information
tibroc committed Apr 25, 2024
1 parent 9bc7b65 commit c77e639
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: lint-python
name: test-pairing-server

on:
push:
Expand All @@ -12,7 +12,7 @@ defaults:
working-directory: ./pairing-server

jobs:
lint:
test:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -34,8 +34,10 @@ jobs:

- run: pip install -r requirements.txt

- run: pip install flake8 bandit
- run: pip install -r requirements-test.txt

- run: flake8 *.py test --max-line-length=120

- run: bandit *.py

- run: python -m pytest
1 change: 1 addition & 0 deletions pairing-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ Install the test dependencies in a virtual environment:
```bash
python3 -m venv test-env
. test-env/bin/activate
pip install -r requirements.txt
pip install -r requirements-test.txt
```

Expand Down
4 changes: 3 additions & 1 deletion pairing-server/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
pytest-asyncio
async_timeout
bandit
flake8
pytest-asyncio

0 comments on commit c77e639

Please sign in to comment.