Skip to content

Commit 2066e60

Browse files
committed
chore: add test.lint and test.format
1 parent 9fec0c4 commit 2066e60

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,29 @@ jobs:
4141
Lint:
4242
if: "!contains(github.event.head_commit.message, '[skip ci]')"
4343
runs-on: ubuntu-latest
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4446
steps:
4547
- uses: actions/checkout@v2
4648
with:
4749
fetch-depth: 0
4850
- name: Commit lint ✨
4951
uses: wagoid/commitlint-github-action@v2
5052

51-
- uses: actions/setup-node@v1
53+
- uses: UziTech/action-setup-atom@v1
54+
- name: Setup PNPM
55+
uses: pnpm/[email protected]
5256
with:
53-
node-version: "14.x"
54-
- name: Install NPM dependencies
55-
run: |
56-
npm install
57+
version: latest
58+
59+
- name: Install dependencies
60+
run: pnpm install --only=dev --ignore-scripts
61+
62+
- name: Format ✨
63+
run: pnpm test.format
64+
5765
- name: Lint ✨
58-
run: npm run lint
66+
run: pnpm test.lint
5967

6068
Release:
6169
needs: [Test, Lint]

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"license": "MIT",
1313
"scripts": {
1414
"format": "prettier --write .",
15+
"test.format": "prettier . --check",
1516
"lint": "eslint . --fix",
17+
"test.lint": "eslint .",
1618
"test": "npm run build && atom --test spec",
1719
"clean": "shx rm -rf dist",
1820
"dev": "npm run clean && cross-env NODE_ENV=development cross-env BABEL_KEEP_MODULES=true rollup -c -w",

0 commit comments

Comments
 (0)