Skip to content

Commit 67922ad

Browse files
authored
ci: Add codecov gh-action (#4)
* deps: Update all deps * ci: Add codecov gh-action * docs: Add badges to readme
1 parent 70c2327 commit 67922ad

File tree

5 files changed

+69
-9
lines changed

5 files changed

+69
-9
lines changed

.github/actions/codecov/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Codecov
2+
description: Upload coverage reports to codecov.io
3+
branding:
4+
icon: mail
5+
color: gray-dark
6+
runs:
7+
using: node12
8+
main: ./index.js

.github/actions/codecov/index.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const { exec } = require('child_process');
2+
3+
const upload = (done) => {
4+
exec(
5+
'curl -s https://codecov.io/bash | bash -s -- -t ${CODECOV_TOKEN}',
6+
(error, stdout, stderr) => {
7+
if (error) throw error;
8+
if (stdout) console.log(stdout);
9+
if (stderr) console.error(stderr);
10+
done();
11+
},
12+
);
13+
};
14+
15+
upload(() => {
16+
console.log('Done!');
17+
});

.github/workflows/codecov.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Codecov
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
codecov:
8+
runs-on: ubuntu-latest
9+
name: Codecov
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: Setup node
13+
uses: actions/setup-node@v1
14+
- name: Install dependencies
15+
run: yarn install --ignore-engines --frozen-lockfile
16+
env:
17+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
18+
- name: Build packages
19+
run: yarn run build
20+
- name: Run test
21+
run: yarn run jest:coverage
22+
- name: Upload coverage to Codecov
23+
uses: ./.github/actions/codecov
24+
env:
25+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,22 @@
22
[stigmortenmyre]:
33
https://stigmortenmyre.no/mso/html/concepts/ofconstyletable.htm
44

5+
<div align="center">
6+
57
# MSOType
68

79
TypeScript definitions for MSO (Microsoft Office), including definitions for the
810
`mso-` CSS vendor prefix. Autocompletion and type checking for all known MSO
911
properties and values are provided.
1012

13+
[![](https://img.shields.io/npm/v/msotype?color=black&logoColor=white)](https://www.npmjs.com/package/msotype)
14+
![](https://img.shields.io/github/workflow/status/email-types/msotype/Test?logo=github&color=black)
15+
[![](https://img.shields.io/codecov/c/github/email-types/msotype?logo=codecov&logoColor=white&color=black)](https://codecov.io/gh/email-types/msotype)
16+
[![](https://img.shields.io/bundlephobia/min/msotype?logo=bundlephobia&color=black)](https://bundlephobia.com/result?p=msotype)
17+
[![](https://img.shields.io/bundlephobia/minzip/msotype?logo=bundlephobia&color=black)](https://bundlephobia.com/result?p=msotype)
18+
19+
</div>
20+
1121
Install with yarn:
1222

1323
```sh

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"test": "yarn build && yarn run lint && yarn run jest",
1515
"jest": "jest --colors --logHeapUsage",
1616
"jest:coverage": "yarn run jest --coverage",
17-
"lint": "eslint . --ext js,ts --max-warnings=0 --report-unused-disable-directives",
17+
"lint": "eslint . --max-warnings=0 --report-unused-disable-directives",
1818
"pretty": "prettier \"**/*.{js,ts,md,json}\" --write",
1919
"changelog": "conventional-changelog -p conventional-changelog-beemo -i CHANGELOG.md -s",
2020
"version:canary": "yarn version --prerelease --preid canary"
@@ -23,7 +23,7 @@
2323
"**/*.{js,ts,md,json}": [
2424
"yarn run pretty"
2525
],
26-
"**/*.{js,ts}": [
26+
"{.github/}**/*.{js,ts}": [
2727
"yarn run lint --fix"
2828
]
2929
},
@@ -33,24 +33,24 @@
3333
}
3434
},
3535
"devDependencies": {
36-
"@email-types/data": "^1.0.0-canary.3",
36+
"@email-types/data": "^1.0.0-canary.4",
3737
"@postmates/eslint-config": "^5.1.1",
3838
"@types/fs-extra": "^8.0.1",
3939
"@types/jest": "^24.0.23",
40-
"@types/node": "^12.12.14",
40+
"@types/node": "^12.12.18",
4141
"@types/prettier": "^1.19.0",
4242
"@typescript-eslint/eslint-plugin": "^2.7.0",
4343
"@typescript-eslint/parser": "^2.7.0",
4444
"colors": "^1.4.0",
4545
"conventional-changelog-beemo": "^1.6.0",
46-
"conventional-changelog-cli": "^2.0.28",
47-
"csstype": "^2.6.7",
46+
"conventional-changelog-cli": "^2.0.31",
47+
"csstype": "^2.6.8",
4848
"eslint": "^6.7.2",
4949
"eslint-config-prettier": "^6.7.0",
50-
"eslint-plugin-import": "^2.18.2",
50+
"eslint-plugin-import": "^2.19.1",
5151
"eslint-plugin-jest": "^23.1.1",
5252
"eslint-plugin-jsx-a11y": "^6.2.3",
53-
"eslint-plugin-prettier": "^3.1.1",
53+
"eslint-plugin-prettier": "^3.1.2",
5454
"eslint-plugin-react": "^7.17.0",
5555
"eslint-plugin-react-hooks": "^1.7.0",
5656
"fs-extra": "^8.1.0",
@@ -60,7 +60,7 @@
6060
"prettier": "^1.19.1",
6161
"ts-jest": "^24.2.0",
6262
"ts-node": "^8.5.4",
63-
"typescript": "^3.7.2"
63+
"typescript": "^3.7.3"
6464
},
6565
"keywords": [
6666
"definitions",

0 commit comments

Comments
 (0)