Skip to content

Commit 5962e83

Browse files
committed
chore: add test.lint and test.format
1 parent 1cfc4a9 commit 5962e83

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,33 @@ jobs:
3131
run: |
3232
apm install
3333
34+
Lint:
35+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
36+
runs-on: ubuntu-latest
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
steps:
40+
- uses: actions/checkout@v2
41+
with:
42+
fetch-depth: 0
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/action-setup@v1.2.1
49+
with:
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+
58+
# - name: Lint ✨
59+
# run: pnpm test.lint
60+
3461
Release:
3562
needs: [Test]
3663
if: github.ref == 'refs/heads/master' &&

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
"license": "MIT",
3232
"scripts": {
3333
"format": "prettier --write .",
34+
"test.format": "prettier . --check",
35+
"lint": "eslint . --fix",
36+
"test.lint": "eslint .",
3437
"tsc": "tsc -p src/tsconfig.json || echo done",
3538
"build": "npm run tsc",
3639
"prepare": "npm run build",

0 commit comments

Comments
 (0)