Skip to content

Commit

Permalink
Split CI test runners by solvers
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed Dec 16, 2023
1 parent eb6fe2d commit 8f3d54d
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 2 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/python-test-pardiso.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# This workflow will install Python dependencies and run tests
# across operating systems, select versions of Python, and user + dev environments
# For more info see:
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python 🐍 CI/CD tests

on:
push:
branches: [main, develop]
paths-ignore: # prevents workflow execution when only these types of files are modified
- "**.md" # wildcards prevent file in any repo dir from trigering workflow
- "**.bib"
- "**.ya?ml" # captures both .yml and .yaml
- "LICENSE"
- ".gitignore"
pull_request:
branches: [main, develop]
types: [opened, reopened] # excludes syncronize to avoid redundant trigger from commits on PRs
paths-ignore:
- "**.md"
- "**.bib"
- "**.ya?ml"
- "LICENSE"
- ".gitignore"
workflow_dispatch: # also allow manual trigger, for testing purposes

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
py-version: ["3.9", "3.12"]

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

# general Python setup
- name: Set up Python ${{ matrix.py-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py-version }}

- name: Update pip & install testing pkgs
run: |
python -VV
python -m pip install --upgrade pip setuptools wheel
# install testing
- name: Install package and test deps
run: |
pip install .[testing] # install the package and the testing deps
pip install pypardiso
- name: Test with pytest
run: |
pytest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
py-version: ["3.9", "3.11"]
py-version: ["3.12"]

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/python-test-umfpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# This workflow will install Python dependencies and run tests
# across operating systems, select versions of Python, and user + dev environments
# For more info see:
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python 🐍 CI/CD tests

on:
push:
branches: [main, develop]
paths-ignore: # prevents workflow execution when only these types of files are modified
- "**.md" # wildcards prevent file in any repo dir from trigering workflow
- "**.bib"
- "**.ya?ml" # captures both .yml and .yaml
- "LICENSE"
- ".gitignore"
pull_request:
branches: [main, develop]
types: [opened, reopened] # excludes syncronize to avoid redundant trigger from commits on PRs
paths-ignore:
- "**.md"
- "**.bib"
- "**.ya?ml"
- "LICENSE"
- ".gitignore"
workflow_dispatch: # also allow manual trigger, for testing purposes

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
py-version: ["3.12"]

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

# general Python setup
- name: Set up Python ${{ matrix.py-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py-version }}

- name: Update pip & install testing pkgs
run: |
python -VV
python -m pip install --upgrade pip setuptools wheel
# install testing
- name: Install package and test deps
run: |
pip install .[testing] # install the package and the testing deps
pip install scikit-umfpack
- name: Test with pytest
run: |
pytest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ tracker = "https://github.com/brightway-lca/brightway2-calc/issues"
testing = [
"bw2calc",
"bw2data>=4.0.DEV32",
"pypardiso",
"pytest",
"pytest-cov",
"pytest-randomly",
"python-coveralls"
]
dev = [
Expand Down

0 comments on commit 8f3d54d

Please sign in to comment.