-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
1 parent
c2a5ce9
commit fb0668e
Showing
6 changed files
with
86 additions
and
65 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,39 @@ | ||
name: Check Coverage | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Python Poetry Action | ||
uses: abatilo/actions-poetry@v2.1.3 | ||
with: | ||
poetry-version: "1.6.1" | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
cache: "poetry" | ||
- name: Install prerequisites | ||
run: | | ||
sudo ./scripts/install-taskwarrior.sh | ||
poetry install --all-extras | ||
poetry self add "poetry-dynamic-versioning[plugin]" | ||
task --version | ||
- name: Coverage | ||
run: | | ||
poetry run coverage run -m pytest --doctest-modules | ||
poetry run coverage report | ||
# Using --service=github + secrets.GITHUB_TOKEN for builds originating from PRs to work | ||
# Not sure if both are required | ||
# https://github.com/TheKevJames/coveralls-python/issues/252 | ||
- name: Coveralls | ||
run: poetry run coveralls --service=github || poetry run coveralls | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
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
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,25 @@ | ||
name: Style and Linters | ||
on: | ||
push: | ||
pull_request: | ||
jobs: | ||
style_and_linters: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Python Poetry Action | ||
uses: abatilo/actions-poetry@v3 | ||
with: | ||
poetry-version: "1.6.1" | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
cache: "poetry" | ||
- name: Install prerequisites | ||
run: | | ||
poetry install --all-extras | ||
poetry self add "poetry-dynamic-versioning[plugin]" | ||
- name: "Run pre-commit hooks" | ||
uses: slamcore/pre-commit-action@v0.2.0 | ||
with: | ||
command_prefix: "poetry run" |
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,16 @@ | ||
name: Publish package | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
publish_package: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Publish package to pypi | ||
uses: JRubics/poetry-publish@v1.16 | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
with: | ||
pypi_token: ${{ secrets.PYPI_API_TOKEN }} | ||
plugins: "poetry-dynamic-versioning[plugin]" |
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