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
Move coverage to GitHub actions #10898
Merged
nicolo-ribaudo
merged 5 commits into
babel:master
from
JLHwung:move-coverage-test-to-github-actions
Dec 20, 2019
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ad87584
chore: remove Circle CI test config
JLHwung deb7425
chore: add GitHub Actions: Report Coverage
JLHwung 07e2bf0
chore: polish the step names
JLHwung b2bd83d
chore: remove Circle CI test job definition
JLHwung 6b47be7
chore: remove cache actions as it seems that they are hanging forever
JLHwung File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Report Coverage | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [13.x] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Environment log | ||
id: env | ||
run: | | ||
echo "::set-output name=yarn-cache-dir::$(yarn cache dir)" | ||
yarn --version | ||
- name: Get node_modules cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Get yarn cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.env.outputs.yarn-cache-dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Generate coverage report | ||
run: | | ||
yarn --version | ||
make test-ci-coverage | ||
# Builds babel-standalone with the regular Babel config | ||
# test-ci-coverage doesn't test babel-standalone, as trying to gather coverage | ||
IS_PUBLISH=true make build-standalone | ||
# data for a JS file that's several megabytes large is bound to fail. Here, | ||
# we just run the babel-standalone test separately. | ||
yarn jest "\-standalone/test" | ||
- name: Upload coverage report | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is just for coverage, maybe we can avoid testing standalone here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The standalone is only tested on the coverage job in the CI, we have skipped the test on other executors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh then maybe we should test it separately? I don't really see how it fits in the coverage tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but standalone will rely on building and installing all the dependencies, I think we can test it here to save redundant machine hours.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok fair