-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
299 additions
and
195 deletions.
There are no files selected for viewing
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,84 @@ | ||
name: Run tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- "3.x/*" | ||
pull_request: | ||
branches: | ||
- "3.x/*" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
linting: | ||
name: Run linters | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install Just | ||
uses: extractions/setup-just@v1 | ||
with: | ||
just-version: 1.14.0 | ||
|
||
- name: Setup environment to run tox | ||
run: | ||
just setup-runner | ||
|
||
- name: Run linters | ||
run: | ||
just lint | ||
|
||
testing: | ||
name: Run tests | ||
runs-on: ${{ matrix.os }} | ||
needs: linting | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python_version: | ||
- { setup: '3.8', tox: 'py38' } | ||
- { setup: '3.9', tox: 'py39' } | ||
- { setup: '3.10', tox: 'py310' } | ||
- { setup: '3.11', tox: 'py311' } | ||
- { setup: 'pypy3.8', tox: 'pypy38' } | ||
- { setup: 'pypy3.9', tox: 'pypy39' } | ||
- { setup: 'pypy3.10', tox: 'pypy310' } | ||
|
||
os: [ ubuntu-latest ] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python_version.setup }} | ||
|
||
- name: Install Just | ||
uses: extractions/setup-just@v1 | ||
with: | ||
just-version: 1.14.0 | ||
|
||
- name: Setup environment to run tox | ||
run: | ||
just setup-runner | ||
|
||
- name: Run tests | ||
run: | ||
just test-on-python-version ${{ matrix.python_version.tox }} |
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,52 @@ | ||
[private] | ||
@default: | ||
just --list | ||
|
||
@bootstrap: | ||
pip install -r requirements/pre.txt | ||
pip install -e . | ||
pip install -r requirements/dev.txt | ||
pre-commit | ||
pre-commit install | ||
|
||
@venv-sync: | ||
pip-sync requirements/pre.txt requirements/dev.txt | ||
pip install -e . | ||
|
||
@setup-runner: | ||
pip install -r requirements/pre.txt | ||
pip install -r requirements/runner.txt | ||
|
||
@lint: | ||
tox -e lint | ||
|
||
@test: | ||
tox -e $(tox list --no-desc | grep '^py' | grep 'new$' | tr '\n' ',') | ||
|
||
@test-all: | ||
tox -e $(tox list --no-desc | grep '^py' | sort -r | tr '\n' ',') | ||
|
||
@test-all-p: | ||
tox -e $(tox list --no-desc | grep '^py' | sort -r | tr '\n' ',') -p auto | ||
|
||
@test-on-python-version target: | ||
tox -e $(tox list --no-desc | grep '^{{ target }}' | sort -r | tr '\n' ',') | ||
|
||
@cov: | ||
inv cov | ||
|
||
@deps-compile: | ||
inv deps-compile | ||
|
||
doc_source := "docs" | ||
doc_target := "docs-build" | ||
|
||
@doc: | ||
sphinx-build -M html {{ doc_source }} {{ doc_target }} | ||
echo "Open file://`pwd`/{{ doc_target }}/html/index.html" | ||
|
||
@doc-clean: | ||
sphinx-build -M clean {{ doc_source }} {{ doc_target }} | ||
|
||
@doc-open: | ||
nohup python -m webbrowser -t "file://`pwd`/docs-build/html/index.html" > /dev/null |
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.