Skip to content

Commit 9c9fb43

Browse files
author
yusukehirao
committed
chore: Add GitHub Actions workflow for testing
1 parent bd3b2d1 commit 9c9fb43

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
17+
with:
18+
node-version: 22
19+
- name: Cache dependencies
20+
id: cache-depends
21+
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
22+
with:
23+
path: '**/node_modules'
24+
key: depends-${{ hashFiles('yarn.lock') }}
25+
- name: Install dependencies
26+
if: steps.cache-depends.outputs.cache-hit != 'true'
27+
run: yarn --frozen-lockfile --check-files
28+
- name: Lint
29+
run: yarn lint
30+
- name: Build
31+
run: yarn build

0 commit comments

Comments
 (0)