Skip to content

Add descriptive comment for OS and Python versions in GitHub Actions … #10

Add descriptive comment for OS and Python versions in GitHub Actions …

Add descriptive comment for OS and Python versions in GitHub Actions … #10

Workflow file for this run

name: Pytest CI

Check failure on line 1 in .github/workflows/pytest.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pytest.yml

Invalid workflow file

Invalid type for `job.strategy`
on:
push:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
- name: List of OS and Python versions to test for
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.x"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pytest pytest-cov
- name: Run Pytest (Linux/macOS)
if: runner.os != 'Windows'
run: python -m pytest --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
- name: Run Pytest (Windows)
if: runner.os == 'Windows'
run: python -m pytest --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html