Skip to content

Commit 500a7cf

Browse files
committed
chore: add test.lint and test.format
1 parent 4f978cc commit 500a7cf

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,33 @@ jobs:
2929
- name: Run tests 👩🏾‍💻
3030
run: npm run test
3131

32+
Lint:
33+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
34+
runs-on: ubuntu-latest
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
steps:
38+
- uses: actions/checkout@v2
39+
with:
40+
fetch-depth: 0
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/action-setup@v1.2.1
47+
with:
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+
#
56+
# - name: Lint ✨
57+
# run: pnpm test.lint
58+
3259
Release:
3360
needs: [Test]
3461
if: github.ref == 'refs/heads/master' &&

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"atom": ">=1.21.0 <2.0.0"
2929
},
3030
"scripts": {
31+
"format": "prettier --write .",
32+
"test.format": "prettier . --check",
33+
"lint": "eslint . --fix",
34+
"test.lint": "eslint .",
3135
"test": "apm test",
3236
"clean": "shx rm -rf dist",
3337
"babel": "npm run clean && shx cp -r lib dist && cross-env NODE_ENV=production cross-env BABEL_KEEP_MODULES=false babel dist --out-dir dist",

0 commit comments

Comments
 (0)