Skip to content

Commit 23049ca

Browse files
committed
Add lint workflow and use yarn
1 parent 5313cbe commit 23049ca

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

.github/workflows/lint-and-format.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lint and Format
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
lint-and-format:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 18
19+
20+
- name: Install packages
21+
run: yarn install --frozen-lockfile
22+
23+
- name: Run ESLint
24+
run: yarn lint
25+
26+
- name: Check Prettier formatting
27+
run: yarn format:check

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
node-version: 18
1919

2020
- name: Install packages
21-
uses: bahmutov/npm-install@v1
21+
run: yarn install --frozen-lockfile
2222

2323
- name: Run tests
24-
run: npm run test
24+
run: yarn test

0 commit comments

Comments
 (0)