Skip to content

Commit

Permalink
WIP Test all supported python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
OmeGak committed Dec 3, 2023
1 parent b98edb2 commit a6ec89c
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ jobs:
run: |
pipx install poetry
- name: Set up Python
id: python
uses: actions/setup-python@v4
with:
# TODO: Remove explicit Python version once bug with .python-version file is solved
# https://github.com/actions/setup-python/issues/734
python-version: '3.11'
cache: 'poetry'
- name: Install package
run: |
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ on:
jobs:
test:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: |
pipx install poetry
- name: Set up Python
id: python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install package
run: |
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
3.10
3.9
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,9 @@ Run tests with:
```sh
poetry run -- make test
```

Run tests against all supported Python versions with:

```sh
tox
```
144 changes: 136 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[virtualenvs]
create = true
in-project = true
prefer-active-python = true

[tool.poetry]
name = "indico-patcher"
Expand Down Expand Up @@ -30,6 +31,7 @@ pytest = "^7.4.0"
pytest-cov = "^4.1.0"
ruff = "^0.0.278"
sqlalchemy2-stubs = "^0.0.2a35"
tox = "^4.11.4"
unbeheader = "^1.2.0"

[build-system]
Expand Down
10 changes: 10 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[tox]
envlist = py{39,310}
no_package = true

[testenv]
allowlist_externals = poetry
commands_pre =
poetry install -v
commands =
poetry run -- make test

0 comments on commit a6ec89c

Please sign in to comment.