mirror of https://github.com/coder/code-server.git
Merge pull request #3227 from cdr/jsjoeio/fix-coverage-shield
docs(readme): refactor to use codecov shield
This commit is contained in:
commit
85ded73195
|
@ -1,6 +1,6 @@
|
||||||
# code-server · [!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/cdr/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://cdr.co/join-community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq)
|
# code-server · [!["GitHub Discussions"](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple)](https://github.com/cdr/code-server/discussions) [!["Join us on Slack"](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen)](https://cdr.co/join-community) [![Twitter Follow](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social)](https://twitter.com/coderhq)
|
||||||
|
|
||||||
![Lines](https://img.shields.io/badge/Coverage-51.47%25-green.svg)
|
[![codecov](https://codecov.io/gh/cdr/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/cdr/code-server)
|
||||||
[![See latest docs](https://img.shields.io/static/v1?label=Docs&message=see%20latest%20&color=blue)](https://github.com/cdr/code-server/tree/v3.9.3/docs)
|
[![See latest docs](https://img.shields.io/static/v1?label=Docs&message=see%20latest%20&color=blue)](https://github.com/cdr/code-server/tree/v3.9.3/docs)
|
||||||
|
|
||||||
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser.
|
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser.
|
||||||
|
|
14
ci/README.md
14
ci/README.md
|
@ -36,20 +36,6 @@ Any file or directory in this subdirectory should be documented here.
|
||||||
1. Install [homebrew](https://brew.sh/)
|
1. Install [homebrew](https://brew.sh/)
|
||||||
2. Run `brew bump-formula-pr --version=3.8.1 code-server` and update the version accordingly. This will bump the version and open a PR. Note: this will only work once the version is published on npm.
|
2. Run `brew bump-formula-pr --version=3.8.1 code-server` and update the version accordingly. This will bump the version and open a PR. Note: this will only work once the version is published on npm.
|
||||||
|
|
||||||
## Updating Code Coverage in README
|
|
||||||
|
|
||||||
Currently, we run a command to manually generate the code coverage shield. Follow these steps:
|
|
||||||
|
|
||||||
1. Run `yarn test:unit` and make sure all the tests are passing
|
|
||||||
2. Run `yarn badges`
|
|
||||||
3. Go into the README and change the color from `red` to `green` in this line:
|
|
||||||
|
|
||||||
```
|
|
||||||
![Lines](https://img.shields.io/badge/Coverage-46.71%25-red.svg)
|
|
||||||
```
|
|
||||||
|
|
||||||
NOTE: we have to manually change the color because the default is red if coverage is less than 80. See code [here](https://github.com/olavoparno/istanbul-badges-readme/blob/develop/src/editor.ts#L24-L33).
|
|
||||||
|
|
||||||
## dev
|
## dev
|
||||||
|
|
||||||
This directory contains scripts used for the development of code-server.
|
This directory contains scripts used for the development of code-server.
|
||||||
|
|
|
@ -43,14 +43,6 @@ main() {
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check that they have sd installed
|
|
||||||
if ! command -v sd &>/dev/null; then
|
|
||||||
echo "sd could not be found."
|
|
||||||
echo "We use this when updating files across the codebase."
|
|
||||||
echo -e "See docs here: https://github.com/chmln/sd#installation"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check that they have node installed
|
# Check that they have node installed
|
||||||
if ! command -v node &>/dev/null; then
|
if ! command -v node &>/dev/null; then
|
||||||
echo "node could not be found."
|
echo "node could not be found."
|
||||||
|
@ -94,10 +86,6 @@ main() {
|
||||||
# Ensure the tests are passing and code coverage is up-to-date
|
# Ensure the tests are passing and code coverage is up-to-date
|
||||||
echo -e "Running unit tests and updating code coverage...\n"
|
echo -e "Running unit tests and updating code coverage...\n"
|
||||||
$CMD yarn test:unit
|
$CMD yarn test:unit
|
||||||
# Updates the Lines badge in the README
|
|
||||||
$CMD yarn badges
|
|
||||||
# Updates the svg to be green for the badge
|
|
||||||
$CMD sd "red.svg" "green.svg" ./README.md
|
|
||||||
|
|
||||||
$CMD git commit -am "chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE"
|
$CMD git commit -am "chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE"
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
"ci": "./ci/dev/ci.sh",
|
"ci": "./ci/dev/ci.sh",
|
||||||
"watch": "VSCODE_IPC_HOOK_CLI= NODE_OPTIONS=--max_old_space_size=32384 ts-node ./ci/dev/watch.ts",
|
"watch": "VSCODE_IPC_HOOK_CLI= NODE_OPTIONS=--max_old_space_size=32384 ts-node ./ci/dev/watch.ts",
|
||||||
"icons": "./ci/dev/gen_icons.sh",
|
"icons": "./ci/dev/gen_icons.sh",
|
||||||
"badges": "istanbul-badges-readme",
|
|
||||||
"coverage": "codecov"
|
"coverage": "codecov"
|
||||||
},
|
},
|
||||||
"main": "out/node/entry.js",
|
"main": "out/node/entry.js",
|
||||||
|
@ -65,7 +64,6 @@
|
||||||
"eslint-plugin-import": "^2.18.2",
|
"eslint-plugin-import": "^2.18.2",
|
||||||
"eslint-plugin-jest-playwright": "^0.2.1",
|
"eslint-plugin-jest-playwright": "^0.2.1",
|
||||||
"eslint-plugin-prettier": "^3.1.0",
|
"eslint-plugin-prettier": "^3.1.0",
|
||||||
"istanbul-badges-readme": "^1.2.0",
|
|
||||||
"leaked-handles": "^5.2.0",
|
"leaked-handles": "^5.2.0",
|
||||||
"parcel-bundler": "^1.12.5",
|
"parcel-bundler": "^1.12.5",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
|
|
Loading…
Reference in New Issue