Skip to content

Commit 1db7e2b

Browse files
committed
chore: add test.lint and test.format
1 parent c5518a8 commit 1db7e2b

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

.github/workflows/CI.yml

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

5059
Release:
5160
needs: [Test, Lint]

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
"typings"
1313
],
1414
"scripts": {
15+
"format": "prettier --write .",
16+
"test.format": "prettier . --check",
17+
"lint": "eslint . --fix --ext .ts",
18+
"test.lint": "eslint . --ext .ts",
1519
"clean": "rimraf build",
1620
"compile": "tsc",
1721
"watch": "tsc -watch",
18-
"lint": "eslint . --ext .ts",
1922
"prepare": "npm run clean && npm run compile",
2023
"test": "npm run compile && atom --test build/test"
2124
},

0 commit comments

Comments
 (0)