Skip to content

Fix tests for py 3.12 #442

Fix tests for py 3.12

Fix tests for py 3.12 #442

Workflow file for this run

name: CI
on:
push:
pull_request:
jobs:
style_and_linters:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2.1.3
with:
poetry-version: "1.6.1"
- name: Install prerequisites
run: |
poetry install -E google -E notion -E gkeep
poetry self add "poetry-dynamic-versioning[plugin]"
- name: Run style checkers and linters
run: poetry run pre-commit run --all-files
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Python Poetry Action
uses: abatilo/actions-poetry@v2.1.3
with:
poetry-version: "1.6.1"
- 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 }}
publish_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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]"