diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 68385b634..c6bde5a64 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Tests +name: CI on: push: @@ -23,14 +23,33 @@ jobs: pip install pre-commit pre-commit run --all-files - Linux: + Docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: "Set up Python" + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install doc dependencies + run: | + sudo apt-get update -y + sudo apt-get install pandoc + sudo apt-get update -y + pip install -e .[docs] + - name: Build docs + run: | + cd docs + python -m sphinx -T -E -W -b html -d _build/doctrees . _build/html + + Tests: needs: Linting runs-on: ubuntu-latest strategy: + fail-fast: false max-parallel: 4 matrix: python-version: ["3.9", "3.11"] - steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} @@ -41,15 +60,6 @@ jobs: run: | 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: | coverage run --source=pysindy -m pytest test -m "not slow" && coverage xml