Skip to content

Commit

Permalink
chore: add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
manyyuri committed May 4, 2024
1 parent 000d050 commit 43a25ac
Show file tree
Hide file tree
Showing 4 changed files with 201 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .eslintcache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"/Users/junyingli/techLearn/sparrow/.eslintrc.js":"1","/Users/junyingli/techLearn/sparrow/__tests__/index.spec.js":"2","/Users/junyingli/techLearn/sparrow/__tests__/utils.js":"3","/Users/junyingli/techLearn/sparrow/commitlint.config.js":"4","/Users/junyingli/techLearn/sparrow/jest.config.js":"5","/Users/junyingli/techLearn/sparrow/rollup.config.js":"6"},{"size":321,"mtime":1714798637298},{"size":439,"mtime":1714798976156},{"size":125,"mtime":1714798873695},{"size":67,"mtime":1714800551268,"results":"7","hashOfConfig":"8"},{"size":241,"mtime":1714798750613},{"size":586,"mtime":1714799824809},{"filePath":"9","messages":"10","suppressedMessages":"11","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1hkiy78","/Users/junyingli/techLearn/sparrow/commitlint.config.js",[],[]]
[{"/Users/junyingli/techLearn/sparrow/.eslintrc.js":"1","/Users/junyingli/techLearn/sparrow/__tests__/index.spec.js":"2","/Users/junyingli/techLearn/sparrow/__tests__/utils.js":"3","/Users/junyingli/techLearn/sparrow/commitlint.config.js":"4","/Users/junyingli/techLearn/sparrow/jest.config.js":"5","/Users/junyingli/techLearn/sparrow/rollup.config.js":"6"},{"size":321,"mtime":1714801594557,"results":"7","hashOfConfig":"8"},{"size":435,"mtime":1714801594557,"results":"9","hashOfConfig":"8"},{"size":125,"mtime":1714801594557,"results":"10","hashOfConfig":"8"},{"size":67,"mtime":1714800551268,"results":"11","hashOfConfig":"8"},{"size":241,"mtime":1714801594557,"results":"12","hashOfConfig":"8"},{"size":586,"mtime":1714801594557,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","suppressedMessages":"16","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1hkiy78",{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","suppressedMessages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/junyingli/techLearn/sparrow/.eslintrc.js",[],[],"/Users/junyingli/techLearn/sparrow/__tests__/index.spec.js",[],[],"/Users/junyingli/techLearn/sparrow/__tests__/utils.js",[],[],"/Users/junyingli/techLearn/sparrow/commitlint.config.js",[],[],"/Users/junyingli/techLearn/sparrow/jest.config.js",[],[],"/Users/junyingli/techLearn/sparrow/rollup.config.js",[],[]]
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ci

on: [push, pull_request]

jobs:
build:
runs-on: macOS-latest

steps:
- name: Checkout
uses: actions/[email protected]

- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: "12"

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-build-cache-node-modules-${{ hashFiles('**/package.json') }}
restore-keys: |
cache-node-modules-
- name: Run ci
run: |
npm install
npm run ci
165 changes: 165 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"test": "jest --coverage",
"test-live": "cross-env DEBUG_MODE=1 jest --coverage",
"build": "rimraf -rf ./dist ./lib ./esm && rollup --config",
"prepare": "husky install"
"prepare": "husky install",
"ci": "run-s lint test build"
},
"lint-staged": {
"*.js": "eslint --cache --fix"
Expand Down Expand Up @@ -37,6 +38,7 @@
"husky": "^7.0.0",
"jest": "^26.0.1",
"jest-electron": "^0.1.12",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.2",
"rollup": "^2.58.3",
"rollup-plugin-babel": "^4.4.0",
Expand Down

0 comments on commit 43a25ac

Please sign in to comment.