Updated the CI to include python versions #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- uses: pre-commit/[email protected] | |
checks: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
name: Check Python ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install numpy | |
run: python -m pip install numpy | |
- name: Install | |
run: python -m pip install -e .[test] | |
- name: Test | |
run: python -m pytest | |
build-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install | |
run: python -m pip install -e .[doc] | |
- name: Build docs | |
run: | | |
cd docs | |
make html | |
- name: Upload docs artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Documentation | |
path: docs/_build/html/* |