bcoe / bcoe/c8

Strange behavior in github workflow

Open
#408 6 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
2.1k
Forks
99
PR merge metrics
No merged PRs in 30d

Description

* **Version**: 7.11.3
* **Platform**: ubuntu-20.04 (github actions)

Hi everyone! I encountered strange behavior in github workflow when I change package.json things, not related to c8.
Here are coverage report of all files: https://github.com/ultram4rine/vscode-choosealicense/runs/7054000876?check_suite_focus=true#step:5:79
```sh
---------------|---------|----------|---------|---------|-------------------------------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------|---------|----------|---------|---------|-------------------------------------------
All files | 39.56 | 100 | 35.71 | 39.56 |
src | 100 | 100 | 100 | 100 |
extension.ts | 100 | 100 | 100 | 100 |
src/api | 100 | 100 | 100 | 100 |
index.ts | 100 | 100 | 100 | 100 |
src/commands | 31.44 | 100 | 0 | 31.44 |
index.ts | 31.44 | 100 | 0 | 31.44 | 22-61,67-80,86-106,135-179,182-194
src/config | 9.55 | 100 | 0 | 9.55 |
index.ts | 9.55 | 100 | 0 | 9.55 | ...0,23-73,76-100,103-115,118-127,130-157
src/utils | 100 | 100 | 100 | 100 |
index.ts | 100 | 100 | 100 | 100 |
---------------|---------|----------|---------|---------|-------------------------------------------
```

And here are the report of only files that actually tested: https://github.com/ultram4rine/vscode-choosealicense/runs/7054022246?check_suite_focus=true#step:5:75
```sh
-----------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
-----------|---------|----------|---------|---------|-------------------
All files | 100 | 100 | 100 | 100 |
api | 100 | 100 | 100 | 100 |
index.ts | 100 | 100 | 100 | 100 |
utils | 100 | 100 | 100 | 100 |
index.ts | 100 | 100 | 100 | 100 |
-----------|---------|----------|---------|---------|-------------------
```

And thats the [commit](https://github.com/ultram4rine/vscode-choosealicense/commit/4a1495aa073ebff7e118f112e642bf560b73f2d6). I changed [activation events](https://code.visualstudio.com/api/references/activation-events) for vscode extension from `onStartupFinished` to `onCommand`.
[Here](https://app.codecov.io/gh/ultram4rine/vscode-choosealicense/commits?branch=fix-coverage) you can see how coverage changes.

On my local machine coverage report works fine, I run it just like in workflow: `/usr/bin/xvfb-run --auto-servernum yarn coverage`

Can someone explain to me how that things related?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.