Update .readthedocs.yml #87
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
# This workflow will install Python dependencies and run tests with a variety of Python versions | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Test | |
on: | |
push: | |
pull_request: | |
schedule: # At 00:00 on day-of-month 1 | |
- cron: '0 0 1 * *' | |
jobs: | |
test: | |
name: ${{ matrix.os}} / py${{ matrix.python_version }} | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [Ubuntu] | |
python_version: ['3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
name: Install Python ${{ matrix.python_version }} | |
with: | |
python-version: ${{ matrix.python_version }} | |
architecture: x64 | |
- name: Install (testing) requirements | |
run: | | |
python -m pip install --upgrade pip setuptools | |
pip install pytest | |
- name: Install psignifit to be tested | |
run: | | |
pip install . | |
- name: Run tests for ${{ matrix.python_version }} through nox | |
run: | | |
pytest -vv | |
lint: | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: flake8 Lint Errors | |
uses: py-actions/flake8@v2 | |
with: | |
args: --count --select=E9,F63,F7,F82 --show-source --statistics | |
# stop the build if there are Python syntax errors or undefined names | |
# E9: Runtime errors (syntax, indentation, io) | |
# F63: Wrong use of operators and always-true assertion tests | |
# F7: Wrong position of statements (break, continue, return, ...) | |
# F82: Undefined (variable) name | |
- name: flake8 Lint Warnings | |
uses: py-actions/flake8@v2 | |
with: | |
args: --count --exit-zero --statistics --show-source | |
# print warnings if other style errors are found. | |
# see .flake8 config file for selected/ignored rules. | |
# warnings can be found in the action logs | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
cache: pip | |
cache-dependency-path: setup.cfg | |
- name: Install package with docs | |
run: | | |
python3 -m pip install --upgrade pip | |
pip install -e .[docs] | |
- name: Build the documentation | |
run: | | |
cd docs && make html |