Skip to content

Commit 85ded73

Browse files
Merge pull request #3227 from cdr/jsjoeio/fix-coverage-shield
docs(readme): refactor to use codecov shield
2 parents d6cdeab + cb5997b commit 85ded73

File tree

4 files changed

+1
-29
lines changed

4 files changed

+1
-29
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 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)
22

3-
![Lines](https://img.shields.io/badge/Coverage-51.47%25-green.svg)
3+
[![codecov](https://codecov.io/gh/cdr/code-server/branch/main/graph/badge.svg?token=5iM9farjnC)](https://codecov.io/gh/cdr/code-server)
44
[![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)
55

66
Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and access it in the browser.

ci/README.md

-14
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,6 @@ Any file or directory in this subdirectory should be documented here.
3636
1. Install [homebrew](https://brew.sh/)
3737
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.
3838

39-
## Updating Code Coverage in README
40-
41-
Currently, we run a command to manually generate the code coverage shield. Follow these steps:
42-
43-
1. Run `yarn test:unit` and make sure all the tests are passing
44-
2. Run `yarn badges`
45-
3. Go into the README and change the color from `red` to `green` in this line:
46-
47-
```
48-
![Lines](https://img.shields.io/badge/Coverage-46.71%25-red.svg)
49-
```
50-
51-
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).
52-
5339
## dev
5440

5541
This directory contains scripts used for the development of code-server.

ci/build/release-prep.sh

-12
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ main() {
4343
exit
4444
fi
4545

46-
# Check that they have sd installed
47-
if ! command -v sd &>/dev/null; then
48-
echo "sd could not be found."
49-
echo "We use this when updating files across the codebase."
50-
echo -e "See docs here: https://github.com/chmln/sd#installation"
51-
exit
52-
fi
53-
5446
# Check that they have node installed
5547
if ! command -v node &>/dev/null; then
5648
echo "node could not be found."
@@ -94,10 +86,6 @@ main() {
9486
# Ensure the tests are passing and code coverage is up-to-date
9587
echo -e "Running unit tests and updating code coverage...\n"
9688
$CMD yarn test:unit
97-
# Updates the Lines badge in the README
98-
$CMD yarn badges
99-
# Updates the svg to be green for the badge
100-
$CMD sd "red.svg" "green.svg" ./README.md
10189

10290
$CMD git commit -am "chore(release): bump version to $CODE_SERVER_VERSION_TO_UPDATE"
10391

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"ci": "./ci/dev/ci.sh",
3232
"watch": "VSCODE_IPC_HOOK_CLI= NODE_OPTIONS=--max_old_space_size=32384 ts-node ./ci/dev/watch.ts",
3333
"icons": "./ci/dev/gen_icons.sh",
34-
"badges": "istanbul-badges-readme",
3534
"coverage": "codecov"
3635
},
3736
"main": "out/node/entry.js",
@@ -65,7 +64,6 @@
6564
"eslint-plugin-import": "^2.18.2",
6665
"eslint-plugin-jest-playwright": "^0.2.1",
6766
"eslint-plugin-prettier": "^3.1.0",
68-
"istanbul-badges-readme": "^1.2.0",
6967
"leaked-handles": "^5.2.0",
7068
"parcel-bundler": "^1.12.5",
7169
"prettier": "^2.2.1",

0 commit comments

Comments
 (0)