From be6eb0fd3d28bc136243d68a89d786db32f3929e Mon Sep 17 00:00:00 2001 From: Jake <37048747+Jacob-Stevens-Haas@users.noreply.github.com> Date: Wed, 17 Apr 2024 10:05:37 -0700 Subject: [PATCH] Merge master CI --- .github/workflows/main.yml | 39 ++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d93b29d7..68385b63 100644 --- a/.github/workflows/main.yml +++ b/.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 @@ -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') }}