Skip to content

Commit 3165ddb

Browse files
WEBDEV-7347 Update codecov configuration and docs (#84)
* Update codecov configuration and docs * Update messaging re: GitHub apps
1 parent c73bd78 commit 3165ddb

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ jobs:
2020
- name: Run tests
2121
run: yarn run test
2222

23-
- name: Upload reports
24-
run: npx codecov
23+
- uses: codecov/codecov-action@v5
24+
with:
25+
token: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![Build Status](https://github.com/internetarchive/iaux-typescript-wc-template/actions/workflows/ci.yml/badge.svg) [![codecov](https://codecov.io/gh/internetarchive/iaux-typescript-wc-template/branch/main/graph/badge.svg?token=ZOYRJ2BV9W)](https://codecov.io/gh/internetarchive/iaux-typescript-wc-template)
1+
![Build Status](https://github.com/internetarchive/iaux-typescript-wc-template/actions/workflows/ci.yml/badge.svg) [![codecov](https://codecov.io/gh/internetarchive/iaux-typescript-wc-template/graph/badge.svg?token=ZOYRJ2BV9W)](https://codecov.io/gh/internetarchive/iaux-typescript-wc-template)
22

33
# Internet Archive Typescript WebComponent Template
44

@@ -15,6 +15,8 @@ This is a base template for creating Typescript WebComponents. It is based off o
1515
3. `README.md` (this file). Update the readme in general, but also the badge URLs
1616
4. `package.json` Update the name and description
1717
5. Rename the `your-webcomponent.ts` and its associated `.test` file
18+
6. Enable `Codecov` and `renovate` in the GitHub Apps section if not already enabled (be sure not to enable `pre-commit`)
19+
7. Set up a Codecov token (see [Codecov Setup](#codecov-setup))
1820

1921
## Local Demo with `web-dev-server`
2022
```bash
@@ -85,10 +87,24 @@ For most of the tools, the configuration is in the `package.json` to reduce the
8587

8688
If you customize the configuration a lot, you can consider moving them to individual files.
8789

88-
### Add Codecov
89-
- after forking, add your repo to the authorized codecov list: `https://github.com/organizations/internetarchive/settings/installations/1268216`
90-
- then, go to the badge maker page for your repo: `https://app.codecov.io/gh/internetarchive/<repo-name>/settings/badge`
91-
- copy link & paste into top of README.md
90+
### Codecov setup
91+
**Finding your token**
92+
- Log in at https://codecov.io/ with your GitHub account
93+
- Switch from your personal organization to `internetarchive` if needed, by toggling at the top of the screen or visiting https://app.codecov.io/gh/internetarchive directly
94+
- Find your repository and hit the `Configure` button or visit `https://app.codecov.io/gh/internetarchive/YOUR-REPO-NAME/config`
95+
- Go the `General` tab and find the `Tokens` section
96+
- Copy everything after `CODECOV_TOKEN=`
97+
98+
**Adding your token**
99+
- Return to your repository and go to `Settings` > `Secrets and variables` (under `Security`) > `Actions`
100+
- Select `New repository secret`
101+
- Name your secret `CODECOV_TOKEN` and paste in the token you just copied
102+
- Select `Add Secret`
103+
104+
**Adding your badge**
105+
- Back in `Configuration` in Codecov, go to the `Badges & Graphs` section
106+
- Copy the Markdown version of the badge
107+
- Delete the current Codecov badge at the top of this README and replace it with your new badge
92108

93109
## Steps to setup `gh-pages` static site generator
94110

0 commit comments

Comments
 (0)