diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml deleted file mode 100644 index 8e8db2f..0000000 --- a/.github/workflows/lint-and-test.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Lint and test - -on: push - -permissions: - contents: read - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ['3.10', '3.11', '3.12'] - steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install flake8 pytest - - 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 project default is 100 char lines - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics - - name: Test with pytest - run: | - pytest diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index e84ded3..13e877b 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -1,11 +1,12 @@ # This workflow will install Python dependencies, run tests and lint with a single version of Python # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python -name: Build and generate documentation +name: Test, build, and generate docs on: push: branches: + - '**' - '!main' permissions: @@ -13,7 +14,33 @@ permissions: pull-requests: write jobs: + test: + name: Test Python versions + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.10', '3.11', '3.12'] + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + - 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 project default is 100 char lines + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics + - name: Test with pytest + run: | + pytest build: + name: Build and generate documentation runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4fdbd7b..74ca3d0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Publish to PyPI +name: Test, build, generate docs, and publish to PyPI on: push: @@ -6,6 +6,31 @@ on: - 'v[0-9]+.[0-9]+.[0-9]+' jobs: + test: + name: Test Python versions + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.10', '3.11', '3.12'] + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install flake8 pytest + - 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 project default is 100 char lines + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics + - name: Test with pytest + run: | + pytest pypi-publish: name: Upload release to PyPI and update documentation runs-on: ubuntu-latest diff --git a/docs/.buildinfo b/docs/.buildinfo index 2e21863..6c3c49e 100644 --- a/docs/.buildinfo +++ b/docs/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 3465a6806a3b92c70a28cd34d52c2769 +config: fe61de21a3a9d7528fb262fe40f5d7fe tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_modules/index.html b/docs/_modules/index.html index a056413..48dedd2 100644 --- a/docs/_modules/index.html +++ b/docs/_modules/index.html @@ -3,7 +3,7 @@
-