Skip to content

Commit 6d68d68

Browse files
committed
add pytest settings
1 parent 46e1e57 commit 6d68d68

File tree

4 files changed

+110
-1
lines changed

4 files changed

+110
-1
lines changed

.github/workflows/pytest.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Run and display pytest
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
pull_request:
9+
branches:
10+
- main
11+
12+
jobs:
13+
pytest:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
python-version: ["3.10", "3.11", "3.12"]
19+
fail-fast: false
20+
21+
steps:
22+
uses: actions/checkout@v3
23+
- name: Setup Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install pytest
32+
33+
- name: Run pytest
34+
uses: pavelzw/pytest-action@v2
35+
with:
36+
verbose: true
37+
emoji: false
38+
job-summary: true
39+
40+
- name: Upload results
41+
uses: actions/upload-artifact@v3
42+
with:
43+
name: test_results
44+
path: results/*.xml
45+
46+
- name: Download results
47+
uses: actions/download-artifact@v3
48+
with:
49+
name: test_results
50+
path: artifacts
51+
52+
- name: display results
53+
uses: EnricoMi/publish-unit-test-result-action@v1
54+
with:
55+
files: artifacts/**/*.xml

poetry.lock

Lines changed: 49 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pillow = "^10.2.0"
1717
scikit-rf = "^0.32.0"
1818
pydantic = "^2.8.2"
1919
toml = "^0.10.2"
20+
pytest = "^8.2.2"
2021

2122
[tool.poetry.group.dev.dependencies]
2223
ipykernel = "^6.26.0"
@@ -28,6 +29,7 @@ myst-parser = "^3.0.1"
2829
requires = ["poetry-core"]
2930
build-backend = "poetry.core.masonry.api"
3031

32+
3133
[tool.poetry.group.docs.dependencies]
3234
sphinx-rtd-theme = "^2.0.0"
3335
sphinx = "^7.3.7"

tests/test_of_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import pytest
2+
3+
def test_of_test():
4+
assert 1 == 1

0 commit comments

Comments
 (0)