Skip to content

Commit

Permalink
Split tests into two blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
janbridley committed May 10, 2024
1 parent c256e69 commit 5384645
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
name: Run Tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
#concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true

on:
# trigger on pull requests
pull_request:

# trigger on all commits to master
push:
branches:
- "main"
- "breaking"

# trigger on request
workflow_dispatch:


jobs:
run_tests:
name: Run tests on ubuntu-latest with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.9","3.10","3.11","3.12"]
steps:
# Steps common to both groups
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
Expand All @@ -38,8 +30,22 @@ jobs:
- name: Install package
run: |
python --version
python -c "import numpy; print('numpy', numpy.__version__)"
python -c "import parsnip; print('parsnip', parsnip.__version__)"
python -m pip install . -v --progress-bar off
- name: Test with pytest
run: |
python -m pytest -v
modern_python:
needs: run_tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.10, 3.11, 3.12]

legacy_python:
needs: run_tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]

0 comments on commit 5384645

Please sign in to comment.