Skip to content

Commit

Permalink
Merge pull request #2 from t-sasatani/feat-initpytest
Browse files Browse the repository at this point in the history
Initial pytest
  • Loading branch information
t-sasatani authored Jul 10, 2024
2 parents 46e1e57 + 6d68d68 commit 7add4f3
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 1 deletion.
55 changes: 55 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Run and display pytest

on:
push:
branches:
- main
workflow_dispatch:
pull_request:
branches:
- main

jobs:
pytest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false

steps:
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Run pytest
uses: pavelzw/pytest-action@v2
with:
verbose: true
emoji: false
job-summary: true

- name: Upload results
uses: actions/upload-artifact@v3
with:
name: test_results
path: results/*.xml

- name: Download results
uses: actions/download-artifact@v3
with:
name: test_results
path: artifacts

- name: display results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: artifacts/**/*.xml
50 changes: 49 additions & 1 deletion 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
Expand Up @@ -17,6 +17,7 @@ pillow = "^10.2.0"
scikit-rf = "^0.32.0"
pydantic = "^2.8.2"
toml = "^0.10.2"
pytest = "^8.2.2"

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


[tool.poetry.group.docs.dependencies]
sphinx-rtd-theme = "^2.0.0"
sphinx = "^7.3.7"
Expand Down
4 changes: 4 additions & 0 deletions tests/test_of_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import pytest

def test_of_test():
assert 1 == 1

0 comments on commit 7add4f3

Please sign in to comment.