-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from AustralianCancerDataNetwork/remove-cover…
…age-badge Removed coverage badge and workflow step
- Loading branch information
Showing
2 changed files
with
16 additions
and
15 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 |
---|---|---|
|
@@ -39,7 +39,10 @@ jobs: | |
- name: Lint with Pylint | ||
run: | | ||
poetry run pylint pydicer | ||
# Run tests with coverage & generate badge | ||
- name: MyPy type checking | ||
run: | | ||
# TODO poetry run mypy | ||
echo "Skipping MyPy type checking..." | ||
- name: Conditional Pytest coverage | ||
run: | | ||
if [[ "${{ matrix.python-version }}" == "3.9" ]]; then | ||
|
@@ -52,27 +55,26 @@ jobs: | |
echo "Running Pytest without coverage..." | ||
poetry run pytest | ||
fi | ||
# Commit the coverage badge back to repo (only on main branch & for a specific Python version) | ||
- name: Generate coverage and commit coverage badge | ||
- name: Generate and commit coverage badge | ||
if: github.ref == 'refs/heads/main' && matrix.python-version == '3.9' | ||
run: | | ||
poetry run pip install coverage-badge # These only work with python >=3.9 | ||
# Generate an SVG coverage badge | ||
poetry run coverage-badge -o coverage.svg | ||
# poetry run coverage-badge -o coverage.svg | ||
# Configure git | ||
git config user.name "github-actions" | ||
git config user.email "[email protected]" | ||
# # Configure git | ||
# git config user.name "github-actions" | ||
# git config user.email "[email protected]" | ||
# Pull latest changes to avoid conflicts | ||
git pull --rebase | ||
# # Pull latest changes to avoid conflicts | ||
# git pull --rebase | ||
# Stage and commit coverage.svg | ||
git add coverage.svg | ||
git commit -m "Update coverage badge" || echo "No changes to commit" | ||
# # Stage and commit coverage.svg | ||
# git add coverage.svg | ||
# git commit -m "Update coverage badge" || echo "No changes to commit" | ||
# Push commit | ||
git push | ||
# # Push commit | ||
# git push | ||
env: | ||
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