Skip to content

Merge pull request #6 from render-engine/add-workflows #4

Merge pull request #6 from render-engine/add-workflows

Merge pull request #6 from render-engine/add-workflows #4

Workflow file for this run

name: PyTest
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths:
- ".github/workflows/test.yml"
- "src/**"
- "tests/**"
- "pyproject.toml"
- "requirements.txt"
jobs:
test-against-python-matrix:
# Only test all the supported versions when a pull request is made or the workflow is called
if: ${{github.event_name == 'workflow_call'}} || ${{github.event_name == 'pull_request'}}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
fail-fast: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip" # caching pip dependencies
- name: Install requirements
run: |
python -m pip install -e .[dev]
- name: Run tests
run: |
python -m pytest
test-against-latest-os:
# Always run against the latest version on both Windows, Linux, MacOS
if: github.event.pull_request.user.login != 'dependabot[bot]'
strategy:
matrix:
os: [windows-latest, macos-latest]
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip" # caching pip dependencies
- name: Install requirements
run: |
python -m pip install -e .[dev]
- name: Run tests
run: |
python -m pytest
- name: coverage
uses: actions/upload-artifact@v4
with:
name: code-coverage-report-${{ matrix.os }}
path: .coverage
overwrite: true