Skip to content

Commit

Permalink
pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
kivel committed Dec 19, 2024
1 parent bd4ee9d commit 62f3ad4
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Pytest
on:
workflow_call:
inputs:
python-version:
type: string
description: The version of python to install
required: true
runs-on:
type: string
description: The runner to run this job on
required: true

jobs:
pytest:
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@v4
with:
python-version: ${{ inputs.python-version }}
- name: Test with python ${{ matrix.python-version }}
run: |
uv run --frozen pytest
coverage run -m pytest -v
coverage report
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,24 @@ jobs:
uses: ./.github/workflows/ruff.yml
# with:
# tox: pre-commit,type-checking

test:
# needs: check
# if: needs.check.outputs.branch-pr == ''
strategy:
matrix:
runs-on: ["ubuntu-latest", "windows-latest"] # can add macos-latest
# python-version: ["3.10","3.11","3.12"]
python-version: ["3.12"] # single Python version for now

# include:
# # Include one that runs in the dev environment
# - runs-on: "ubuntu-latest"
# python-version: "dev"
fail-fast: false
uses: ./.github/workflows/_test.yml
with:
runs-on: ${{ matrix.runs-on }}
python-version: ${{ matrix.python-version }}
# secrets:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 62f3ad4

Please sign in to comment.