Skip to content

Add github action that runs pytest. #1

Add github action that runs pytest.

Add github action that runs pytest. #1

Workflow file for this run

name: Test invoke-training
on:
push:
branches: [ $default-branch ]
pull_request:
branches: [ $default-branch ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
- name: Test with pytest
run: |
pytest tests --junitxml=junit/test-results.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v3

Check failure on line 32 in .github/workflows/test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yaml

Invalid workflow file

You have an error in your yaml syntax on line 32
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
# Use always() to always run this step to publish test results when there are test failures.
if: ${{ always() }}