Skip to content

Commit

Permalink
Ci fixes (#5)
Browse files Browse the repository at this point in the history
* include python version in cache key
* fix step summary usage for coverage report
  • Loading branch information
2bndy5 authored Sep 29, 2023
1 parent 2cb6873 commit 7d39c47
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
fetch-depth: 0

- name: Set up Python
id: python-setup
uses: actions/setup-python@v4
with:
python-version: 3.x
Expand All @@ -30,24 +31,24 @@ jobs:

- uses: actions/cache@v3
with:
path: $HOME\\.cache\\pre-commit
key: pre-commit_${{ hashFiles('.pre-commit-config.yaml') }}
path: ~/.cache/pre-commit
key: pre-commit_${{ steps.python-setup.outputs.python-version }}_${{ hashFiles('.pre-commit-config.yaml') }}

- name: Check formatting
run: pre-commit run --all-files

- name: Get test coverage
run: |
coverage run -m pytest
coverage html
echo "$(coverage report --format markdown)" >> $GITHUB_STEP_SUMMARY
coverage report --format markdown >> $env:GITHUB_STEP_SUMMARY
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- run: python3 -m build
- name: Create Distributions
run: python3 -m build

- name: twine Check
run: twine check dist/*
Expand Down

0 comments on commit 7d39c47

Please sign in to comment.