Skip to content

Commit 68dcfa9

Browse files
committed
feat: Add tox test workflow.
1 parent ad63652 commit 68dcfa9

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed
File renamed without changes.

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ['3.9', '3.10', '3.11']
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
python -m pip install tox tox-gh-actions
23+
- name: Run tox test suite
24+
run: tox

tox.ini

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
min_version = 4.0
33
env_list = format, type, lint, py{3.9,3.10,3.11}
44

5+
[gh-actions]
6+
python =
7+
3.9: py39
8+
3.10: py310
9+
3.11: py311, type, format, lint
10+
511
[testenv]
612
labels = core
713
allowlist_externals = poetry
@@ -18,7 +24,6 @@ allowlist_externals = poetry
1824
commands_pre = poetry install --only dev --no-root
1925
commands =
2026
poetry run black --check openapi_pydantic tests
21-
2227

2328
[testenv:lint]
2429
allowlist_externals = poetry

0 commit comments

Comments
 (0)