Merge pull request #452 from vnmanoharan/doc-fixes #3
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: build and test | |
on: | |
push: | |
branches: [ "develop" ] | |
pull_request: | |
branches: [ "develop" ] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
# conda enviroment activation requires bash | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] # ,macos-latest, windows-latest] | |
python-version: ["3.9"] # , "3.10", "3.11", "3.12"] | |
max-parallel: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up miniforge | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
environment-file: environment.yml | |
miniforge-version: latest | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Build package and install | |
run: | | |
python -m pip install --no-build-isolation --editable . | |
- name: Test with pytest and run doctests | |
run: | | |
python run_tests.py |