|
1 | | -name: CI |
| 1 | +name: ci |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
| 5 | + branches: |
| 6 | + - main |
5 | 7 | pull_request: |
| 8 | + branches: |
| 9 | + - main |
6 | 10 |
|
7 | 11 | jobs: |
8 | | - typecheck: |
| 12 | + ci: |
9 | 13 | runs-on: ubuntu-latest |
10 | | - |
11 | 14 | steps: |
12 | | - - name: Checkout |
13 | | - uses: actions/checkout@v3 |
14 | | - |
15 | | - - name: Install Node.js |
16 | | - uses: actions/setup-node@v3 |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + - run: corepack enable |
| 17 | + - uses: actions/setup-node@v4 |
17 | 18 | with: |
18 | 19 | node-version: 20 |
19 | | - |
20 | | - - uses: pnpm/action-setup@v2 |
21 | | - name: Install pnpm |
22 | | - with: |
23 | | - version: 8 |
24 | | - run_install: false |
25 | | - |
26 | | - - name: Get pnpm store directory |
27 | | - shell: bash |
28 | | - run: | |
29 | | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV |
30 | | -
|
31 | | - - uses: actions/cache@v3 |
32 | | - name: Setup pnpm cache |
33 | | - with: |
34 | | - path: ${{ env.STORE_PATH }} |
35 | | - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
36 | | - restore-keys: | |
37 | | - ${{ runner.os }}-pnpm-store- |
38 | | -
|
39 | | - - name: Install dependencies |
40 | | - run: pnpm install && pnpm dev:prepare |
41 | | - |
42 | | - - name: Test |
43 | | - run: pnpm typecheck |
44 | | - |
45 | | - lint: |
46 | | - runs-on: ubuntu-latest |
47 | | - |
48 | | - steps: |
49 | | - - name: Checkout |
50 | | - uses: actions/checkout@v3 |
51 | | - |
52 | | - - name: Install Node.js |
53 | | - uses: actions/setup-node@v3 |
54 | | - with: |
55 | | - node-version: 20 |
56 | | - |
57 | | - - uses: pnpm/action-setup@v2 |
58 | | - name: Install pnpm |
59 | | - with: |
60 | | - version: 8 |
61 | | - run_install: false |
62 | | - |
63 | | - - name: Get pnpm store directory |
64 | | - shell: bash |
65 | | - run: | |
66 | | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV |
67 | | -
|
68 | | - - uses: actions/cache@v3 |
69 | | - name: Setup pnpm cache |
70 | | - with: |
71 | | - path: ${{ env.STORE_PATH }} |
72 | | - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
73 | | - restore-keys: | |
74 | | - ${{ runner.os }}-pnpm-store- |
75 | | -
|
76 | | - - name: Install dependencies |
77 | | - run: pnpm install && pnpm dev:prepare |
78 | | - |
79 | | - - name: Lint |
80 | | - run: pnpm lint |
81 | | - |
82 | | - test: |
83 | | - runs-on: ubuntu-latest |
84 | | - |
85 | | - steps: |
86 | | - - name: Checkout |
87 | | - uses: actions/checkout@v3 |
88 | | - |
89 | | - - name: Install Node.js |
90 | | - uses: actions/setup-node@v3 |
91 | | - with: |
92 | | - node-version: 20 |
93 | | - |
94 | | - - uses: pnpm/action-setup@v2 |
95 | | - name: Install pnpm |
96 | | - with: |
97 | | - version: 8 |
98 | | - run_install: false |
99 | | - |
100 | | - - name: Get pnpm store directory |
101 | | - shell: bash |
102 | | - run: | |
103 | | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV |
104 | | -
|
105 | | - - uses: actions/cache@v3 |
106 | | - name: Setup pnpm cache |
107 | | - with: |
108 | | - path: ${{ env.STORE_PATH }} |
109 | | - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} |
110 | | - restore-keys: | |
111 | | - ${{ runner.os }}-pnpm-store- |
112 | | -
|
113 | | - - name: Install dependencies |
114 | | - run: pnpm install && pnpm dev:prepare |
115 | | - |
116 | | - - name: Test |
117 | | - run: pnpm test |
| 20 | + cache: "pnpm" |
| 21 | + - run: pnpm install && pnpm dev:prepare |
| 22 | + - run: pnpm lint |
| 23 | + - run: pnpm typecheck |
| 24 | + - run: pnpm prepack |
| 25 | + - run: pnpm test |
0 commit comments