Wip/pytest #64
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: | |
branches: | |
- main | |
jobs: | |
# Job 1: Linters for Pull Requests | |
linters: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
python-version: [ '3.8' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install -e .[linters] --no-cache-dir | |
- name: Run interrogate | |
run: interrogate parallax tests | |
continue-on-error: true | |
- name: Run flake8 | |
run: flake8 parallax tests | |
continue-on-error: true | |
# Job 2: Build Documentation for Pushes to Main | |
build-docs: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# Step 2: Set up Python | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
# Step 3: Install dependencies (including Sphinx) | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r docs/requirements.txt | |
# Step 4: Build the documentation | |
- name: Build Documentation | |
run: | | |
sphinx-build -b html docs/source docs/_build | |
# Fail the workflow if documentation build fails | |
continue-on-error: false |