-
Notifications
You must be signed in to change notification settings - Fork 2
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
4 changed files
with
69 additions
and
4 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,32 @@ | ||
name: pytest | ||
|
||
# Triggers the workflow on push for all branches | ||
on: [push] | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Check out repo and set up Python | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
|
||
# Use cached python and dependencies, install poetry | ||
- name: "Setup Python, Poetry and Dependencies" | ||
uses: packetcoders/action-setup-cache-python-poetry@main | ||
with: | ||
python-version: 3.8 | ||
poetry-version: 1.2.2 | ||
|
||
# Run pytest with coverage report and upload results to coveralls | ||
- name: Run tests on python 3.8 | ||
run: | | ||
poetry run pytest --cov --cov-report xml:cobertura.xml --full-trace --show-capture=no -sv -n auto tests/ | ||
- name: Coveralls | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./cobertura.xml |
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,36 @@ | ||
name: update docs/requirements.txt for readthedocs | ||
|
||
on: | ||
# Triggers the workflow on push but only for the main branch | ||
# and only for changes to the poetry.lock file | ||
push: | ||
branches: [ main ] | ||
paths: [poetry.lock] | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Check out repo and set up Python | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
|
||
# Use cached python and dependencies, install poetry | ||
- name: "Setup Python, Poetry and Dependencies" | ||
uses: packetcoders/action-setup-cache-python-poetry@main | ||
with: | ||
python-version: 3.8 | ||
poetry-version: 1.2.2 | ||
|
||
# Generates and commits a requirements.txt used by readthedocs | ||
- name: Export requirements.txt | ||
run: poetry export --without-hashes --format=requirements.txt -o docs/requirements.txt -E docs -E notebook | ||
|
||
- name: Commit changes | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: github_actions | ||
message: 'Updating requirements for docs' | ||
add: 'docs/requirements.txt' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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