-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use Hatch for build and environments * Reinstate coveralls service * Switch Read the Docs to Fural theme
- Loading branch information
Showing
12 changed files
with
281 additions
and
316 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: test | ||
|
||
on: [ push ] | ||
|
||
concurrency: | ||
group: test-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTHONUNBUFFERED: "1" | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
|
||
static_tests: | ||
name: Static Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install latest pip and Hatch | ||
run: pip install --upgrade pip hatch | ||
- name: Lint | ||
run: hatch run lint:all | ||
- name: Docs | ||
run: hatch run docs:build | ||
- name: Build | ||
run: hatch build | ||
|
||
tests_matrix: | ||
name: Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install latest pip, Hatch and coveralls | ||
run: pip install --upgrade pip hatch coveralls | ||
|
||
- name: Run tests | ||
run: hatch run test-cov | ||
|
||
- name: Coverage combine | ||
run: coverage combine | ||
|
||
- name: Upload coveralls (parallel) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_PARALLEL: true | ||
run: coveralls --service=github | ||
|
||
tests: | ||
if: always() | ||
runs-on: ubuntu-latest | ||
needs: [ static_tests, tests_matrix ] | ||
steps: | ||
- name: Check tests matrix status | ||
if: needs.tests_matrix.result != 'success' | ||
run: exit 1 | ||
- name: Finish parallel build | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
parallel-finished: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,10 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
# Optionally set the version of Python and requirements required to build your docs | ||
python: | ||
version: 3.8 | ||
install: | ||
- requirements: docs/requirements.txt | ||
- method: pip | ||
path: . | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
commands: | ||
- pip install -U pip hatch | ||
- hatch run docs:build | ||
- mv docs/_build $READTHEDOCS_OUTPUT |
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 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 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
Oops, something went wrong.