Skip to content

Commit

Permalink
Merge master CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob-Stevens-Haas committed Apr 17, 2024
1 parent ff30661 commit be6eb0f
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions .github/workflows/main.yml
@@ -1,17 +1,23 @@
name: Tests

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
Linting:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.7
python-version: "3.9"
- name: Linting
run: |
pip install pre-commit
Expand All @@ -23,39 +29,36 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.9", "3.11"]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
pip install sympy # needed for notebook 9, but not required for pysindy
pip install --upgrade pip
pip install .[dev,miosr,cvxpy,sbr]
- name: Build the docs
# Not exactly how RTD does it, but close.
run: |
sudo apt-get update -y
sudo apt-get install pandoc
pip install .[docs]
cd docs
python -m sphinx -T -E -W -b html -d _build/doctrees . _build/html
cd ..
- name: Test with pytest
run: |
pytest test --cov=pysindy --cov-report=xml
coverage run --source=pysindy -m pytest test -m "not slow" && coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
- name: Execute feature notebook with papermill
run: |
pip install papermill
cd examples
papermill --report-mode 1_feature_overview.ipynb out.json
- uses: actions/cache@v1
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
Expand Down

0 comments on commit be6eb0f

Please sign in to comment.