Skip to content
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

ci: adds codecov to CI pipeline and coverage badge to README #261

Merged
merged 5 commits into from Mar 5, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -38,15 +38,21 @@ jobs:
- name: Install packages
run: yarn --frozen-lockfile

- name: Install Codecov globally
run: |
yarn global add codecov
echo "$(yarn global bin)" >> $GITHUB_PATH

- name: Lint
run: |-
yarn format:check;
yarn lint;

- name: Test
run: |-
yarn test:unit;
yarn test:coverage;
yarn test:types;
codecov;

- name: Build # Tests to see if a build can succeed
run: yarn build
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
# tabbable [![CI](https://github.com/focus-trap/tabbable/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/focus-trap/tabbable/actions?query=workflow:CI+branch:master) [![license](https://badgen.now.sh/badge/license/MIT)](./LICENSE)
# tabbable [![CI](https://github.com/focus-trap/tabbable/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/focus-trap/tabbable/actions?query=workflow:CI+branch:master) [![Codecov](https://img.shields.io/codecov/c/github/focus-trap/tabbable)](https://codecov.io/gh/focus-trap/tabbable) [![license](https://badgen.now.sh/badge/license/MIT)](./LICENSE)

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors)
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
@@ -1,7 +1,7 @@
module.exports = {
clearMocks: true,
collectCoverageFrom: ['<rootDir>/src/*.js'],
coverageDirectory: 'coverage',
coverageDirectory: '<rootDir>/coverage',
coverageProvider: 'v8',
setupFilesAfterEnv: ['regenerator-runtime/runtime', './setupTests.js'],
testMatch: ['<rootDir>/test/**/*.test.js'],
Expand Down
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -28,9 +28,10 @@
"format:watch": "onchange \"{*,src/**/*,test/**/*,.github/workflows/*}.+(js|yml)\" -- prettier --write {{changed}}",
"lint": "eslint \"*.js\" \"src/**/*.js\" \"test/**/*.js\"",
"start": "yarn compile:cjs && budo -l -d -o test/debug.js -- -t brfs",
"test:unit": "jest",
"test:types": "tsc index.d.ts",
"test": "yarn format:check && yarn lint && yarn test:unit && yarn test:types",
"test:coverage": "jest --coverage",
"test:types": "tsc index.d.ts",
"test:unit": "jest",
"prepare": "yarn build",
"release": "yarn build && changeset publish"
},
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Expand Up @@ -331,7 +331,7 @@
"@babel/helper-plugin-utils" "^7.13.0"
"@babel/plugin-syntax-logical-assignment-operators" "^7.10.4"

"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8":
"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8":
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: This was the result after I removed the codecov package with yarn remove codecov. I checked for what packages are requiring @babel/plugin-proposal-nullish-coalescing-operator, and it's only @babel/preset-env which does in fact request @babel/plugin-proposal-nullish-coalescing-operator@^7.13.8.

So I believe what we see here is correct, and the fact that there were two versions of this package previously installed was unnecessary and that something had gotten out of sync with the lock file.

version "7.13.8"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.13.8.tgz#3730a31dafd3c10d8ccd10648ed80a2ac5472ef3"
integrity sha512-iePlDPBn//UhxExyS9KyeYU7RM9WScAG+D3Hhno0PLJebAEpDZMocbDe64eqynhNAnwz/vZoL/q/QB2T1OH39A==
Expand Down