Skip to content

Commit 584e343

Browse files
committed
chore: add test.lint and test.format
1 parent 96469ff commit 584e343

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

.github/workflows/CI.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,29 @@ jobs:
3434
Lint:
3535
if: "!contains(github.event.head_commit.message, '[skip ci]')"
3636
runs-on: ubuntu-latest
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3739
steps:
3840
- uses: actions/checkout@v2
3941
with:
4042
fetch-depth: 0
41-
# - name: Commit lint ✨
42-
# uses: wagoid/commitlint-github-action@v1
43-
- uses: actions/setup-node@v1
43+
- name: Commit lint ✨
44+
uses: wagoid/commitlint-github-action@v2
45+
46+
- uses: UziTech/action-setup-atom@v1
47+
- name: Setup PNPM
48+
uses: pnpm/[email protected]
4449
with:
45-
node-version: "14.x"
46-
- name: Install NPM dependencies
47-
run: |
48-
npm install
50+
version: latest
51+
52+
- name: Install dependencies
53+
run: pnpm install --only=dev --ignore-scripts
54+
55+
- name: Format ✨
56+
run: pnpm test.format
57+
4958
- name: Lint ✨
50-
run: npm run lint
59+
run: pnpm test.lint
5160

5261
Release:
5362
needs: [Test, Lint]

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"license": "MIT",
1414
"scripts": {
1515
"format": "prettier --write .",
16+
"test.format": "prettier . --check",
1617
"lint": "eslint . --fix",
18+
"test.lint": "eslint .",
1719
"test": "atom --test spec",
1820
"clean": "shx rm -rf dist",
1921
"babel": "npm run clean && shx cp -r src dist && cross-env NODE_ENV=development cross-env BABEL_KEEP_MODULES=false babel dist --out-dir dist",

0 commit comments

Comments
 (0)