Skip to content

Commit

Permalink
ci: check size limit and cleanPublish script (#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
dangreen authored Nov 18, 2021
1 parent 829fd10 commit a3b65a2
Show file tree
Hide file tree
Showing 5 changed files with 861 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .clean-publish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packageManager": "yarn"
}
19 changes: 19 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Checks
on:
pull_request:
branches:
- master
jobs:
size:
runs-on: ubuntu-latest
name: Checking size
if: "!contains(github.event.head_commit.message, '[ci skip]')"
env:
CI_JOB_NUMBER: 1
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Check size
uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
24 changes: 24 additions & 0 deletions .size-limit
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
{
"path": "dist/index.cjs.js",
"limit": "7.7 KB",
"webpack": false,
"running": false
},
{
"path": "dist/index.cjs.js",
"limit": "5.9 KB",
"import": "{ Chart }"
},
{
"path": "dist/index.esm.js",
"limit": "7.4 KB",
"webpack": false,
"running": false
},
{
"path": "dist/index.esm.js",
"limit": "5.9 KB",
"import": "{ Chart }"
}
]
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
"jest": "jest -c jest.config.json",
"test:types": "tsc --skipLibCheck --noEmit",
"test:unit": "yarn jest",
"test:size": "size-limit",
"test": "yarn test:types && yarn test:unit && yarn build",
"prepublishOnly": "npm run build",
"prepublishOnly": "yarn build",
"docz:dev": "docz dev",
"docz:build": "docz build && mkdir docs/react-google-charts && cp -r docs/static docs/react-google-charts/static && mkdir docs/assets/ && cp -r assets/ docs/assets/",
"docz:deploy": "yarn docz:build && cp now.json docs/ && cd docs/ && now && now alias",
"commit": "cz",
"release": "standard-version"
"release": "standard-version",
"cleanPublish": "yarn test && clean-publish"
},
"dependencies": {
"react-load-script": "^0.0.6"
Expand All @@ -35,6 +37,7 @@
"devDependencies": {
"@commitlint/cli": "^14.1.0",
"@commitlint/config-conventional": "^14.1.0",
"@size-limit/preset-big-lib": "^7.0.0",
"@swc/core": "^1.2.108",
"@swc/helpers": "^0.2.14",
"@swc/jest": "^0.2.5",
Expand All @@ -44,6 +47,7 @@
"@types/jquery": "^3.3.5",
"@types/react": "^17.0.34",
"@types/react-dom": "^17.0.11",
"clean-publish": "^3.4.3",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.3.0",
"docz": "^0.10.2",
Expand All @@ -62,6 +66,7 @@
"rollup": "^2.60.0",
"rollup-plugin-typescript2": "^0.31.0",
"simple-git-hooks": "^2.7.0",
"size-limit": "^7.0.0",
"standard-version": "^9.3.2",
"typescript": "^3.8.0"
},
Expand Down
Loading

0 comments on commit a3b65a2

Please sign in to comment.