Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mydea/ember-cli-code-coverage-action
Comment with the diff for the asset sizes on Pull Request
https://github.com/mydea/ember-cli-code-coverage-action
Last synced: about 2 months ago
JSON representation
Comment with the diff for the asset sizes on Pull Request
- Host: GitHub
- URL: https://github.com/mydea/ember-cli-code-coverage-action
- Owner: mydea
- License: mit
- Fork: true (mainmatter/ember-asset-size-action)
- Created: 2019-10-25T09:48:45.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-21T15:49:03.000Z (over 3 years ago)
- Last Synced: 2024-10-14T14:03:41.724Z (2 months ago)
- Language: JavaScript
- Size: 1.22 MB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - mydea/ember-cli-code-coverage-action - Comment with the diff for the asset sizes on Pull Request (JavaScript)
README
# ember-cli-code-coverage action
This action will calculate the code coverage for each PR. It will then comment with the change in coverage on each PR.
## Example usage
Create a file named `.github/workflows/ember-code-coverage.yml` in your repo and add the following:
```yaml
name: ember-cli-code-coverageon: [pull_request]
jobs:
build:runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: mydea/actions-ember-testing@v1
- name: Install dependencies
run: yarn install
- uses: mydea/ember-cli-code-coverage-action@v1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
```Note that the `GITHUB_TOKEN` secret is automatically available, so you don't need to do anything else about that.
## Setting up
-------------------
**`repo-token`** **required**
Token to post statuses and comments on yore repo. Note that the `GITHUB_TOKEN` secret is automatically available, so you don't need to do anything else about that.
-------------------
**`test-command`** *optional*
(default: `yarn test-coverage`)The command to run your tests.
Either you add something like this: `"test-coverage": "COVERAGE=true ember test"` to your package.json file, or you can specify a custom test command.-------------------
**`coverage-file`** *optional*
(default: `./coverage/coverage-summary.json`)The location of coverage summary.json file.
-------------------
**`coverage-indicator`** *optional*
(default: `statements`)The coverage type to use. One of: `statements`, `lines`, `functions`, `branches`.
-------------------
**`working-directory`** *optional*
(default: `./`)Ember app directory.
-------------------
**`message`** *optional*
(default: `Test coverage: **{testCoverage}%**`)Message title that will be used when posting status on PR comments section.