Skip to content

Merge pull request #48 from shirte/main #135

Merge pull request #48 from shirte/main

Merge pull request #48 from shirte/main #135

Workflow file for this run

name: Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test,csp]
- name: Test with pytest
run: |
pytest
test-results:
runs-on: ubuntu-latest
needs: test # This ensures all matrix jobs must succeed before this runs
if: ${{ always() }} # Ensure this job always runs to check the status of matrix jobs
steps:
- name: Ensure all test jobs succeeded
run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}