scryfall-py/.github/workflows/pytest.yml

46 lines
No EOL
1.1 KiB
YAML

name: pytest
on: push
jobs:
pytest:
name: runner / pytest tests
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.6.3"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install the project
run: uv sync --all-extras --dev
- name: Run Tests
run: |
uv run pytest
- name: Upload Coverage
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always() # always run even if the previous step fails
with:
report_paths: 'coverage.xml'
check_name: 'Pytest Results'