File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : ci
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ test :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ steps :
17+ - uses : actions/checkout@v3
18+
19+ - name : Use Node.js
20+ uses : actions/setup-node@v3
21+ with :
22+ node-version : ' lts/*'
23+
24+ - uses : pnpm/action-setup@v2.2.2
25+ name : Install pnpm
26+ id : pnpm-install
27+ with :
28+ version : 7
29+ run_install : false
30+
31+ - name : Get pnpm store directory
32+ id : pnpm-cache
33+ run : |
34+ echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
35+
36+ - uses : actions/cache@v3
37+ name : Setup pnpm cache
38+ with :
39+ path : ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
40+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
41+ restore-keys : |
42+ ${{ runner.os }}-pnpm-store-
43+
44+ - name : Install dependencies
45+ run : pnpm install
46+
47+ - name : Linter
48+ run : pnpm run format:ci
49+
50+ - name : Test
51+ run : pnpm test
52+
53+
Original file line number Diff line number Diff line change @@ -4,3 +4,4 @@ package-lock.json
44coverage
55test
66.idea
7+ .github
Original file line number Diff line number Diff line change 66 "type" : " commonjs" ,
77 "scripts" : {
88 "format" : " rome format . --indent-style space --write" ,
9+ "format:ci" : " rome format . --indent-style space" ,
910 "test" : " vitest" ,
1011 "test:watch" : " vitest --watch" ,
1112 "coverage" : " vitest run --coverage" ,
You can’t perform that action at this time.
0 commit comments