Skip to content

Commit 48972ce

Browse files
committed
Run tox on PR
1 parent a37c05e commit 48972ce

File tree

2 files changed

+70
-1
lines changed

2 files changed

+70
-1
lines changed

.github/workflows/tox.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: check
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches: ["main"]
6+
tags-ignore: ["**"]
7+
pull_request:
8+
9+
concurrency:
10+
group: check-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
name: test with ${{ matrix.python-version }}
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
python-version:
21+
- "3.13"
22+
- "3.12"
23+
- "3.11"
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
cache: 'pip' # caching pip dependencies
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
python -m pip install tox tox-gh-actions
37+
- name: Test with tox
38+
run: tox
39+
flake8:
40+
name: flake8
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
with:
45+
fetch-depth: 0
46+
- name: Set up Python
47+
uses: actions/setup-python@v5
48+
with:
49+
python-version: "3.13"
50+
cache: 'pip' # caching pip dependencies
51+
- name: Install dependencies
52+
run: |
53+
python -m pip install --upgrade pip
54+
python -m pip install flake8 black mypy
55+
- name: Run flake8
56+
run: |
57+
flake8 pytest_persistence/
58+
- name: Run black
59+
run: |
60+
black --check pytest_persistence/
61+
- name: Run mypy
62+
run: |
63+
mypy pytest_persistence/

tox.ini

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
[tox]
2-
envlist = py-pytest{744,800,840,-latest}
2+
envlist = py{311,312,313}-pytest{744,800,840,-latest}
3+
4+
[gh-actions]
5+
python =
6+
3.13: py313
7+
3.12: py312
8+
3.11: py311
39

410
[testenv]
511
deps =

0 commit comments

Comments
 (0)