Skip to content

rename #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Get Cover: The Esential Coverage Reporter GitHub Action
# Python Coverage: The Esential Coverage Reporter GitHub Action for python

> ☂️ parse and publish coverage xml to a PR, enforce coverage rate on new & modified files

Expand All @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Get Cover
uses: orgoro/coverage@v2
uses: orgoro/coverage@v3
with:
coverageFile: path/to/coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -34,10 +34,10 @@ jobs:

## Inputs

| Input | Optional | Description | Example |
|---------------------|----------|--------------------------------------------------|------------------------|
| `coverageFile` | | path to python .xml coverage report | ./path/to/coverage.xml |
| `token` | | your github token | 🤫 |
| Input | Optional | Description | Example |
|---------------------|-----------|--------------------------------------------------|------------------------|
| `coverageFile` | | path to .xml coverage report | ./path/to/coverage.xml |
| `token` | | your github token | 🤫 |
| `thresholdAll` | ✅ | the minimal average line coverage | 0.8 |
| `thresholdNew` | ✅ | the minimal average new files line coverage | 0.9 |
| `thresholdModified` | ✅ | the minimal average modified files line coverage | 0.0 |
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Get Cover'
name: 'Python Coverage'
description: 'Publish coverage report to a PR & enforce coverage on new & modified files'
author: 'orgoro'
inputs:
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

Binary file modified images/pr-message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/scorePr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {formatAverageTable, formatFilesTable, toPercent} from './format'
import {context} from '@actions/github'
import {octokit} from './client'

const TITLE = `# ☂️ Get Cover`
const TITLE = `# ☂️ Python Coverage`

export async function publishMessage(pr: number, message: string): Promise<void> {
const body = TITLE.concat(message)
Expand Down Expand Up @@ -66,8 +66,8 @@ export function scorePr(filesCover: FilesCoverage): boolean {
core.info('No covered modified files in this PR ')
}
const sha = context.payload.pull_request?.head.sha.slice(0, 7)
const action = '[action](https://github.com/marketplace/actions/get-cover)'
message = message.concat(`\n\n\n> **updated for commit: \`${sha}\` by ${action}🛡**`)
const action = '[action](https://github.com/marketplace/actions/python-coverage)'
message = message.concat(`\n\n\n> **updated for commit: \`${sha}\` by ${action}🐍**`)
message = `\n> current status: ${passOverall ? '✅' : '❌'}`.concat(message)
publishMessage(context.issue.number, message)
core.endGroup()
Expand Down