|
8 | 8 | runs-on: ubuntu-latest |
9 | 9 |
|
10 | 10 | steps: |
11 | | - - uses: actions/checkout@v2 |
| 11 | + - uses: actions/checkout@v4 |
12 | 12 |
|
13 | | - - name: Get Yarn cache directory path |
14 | | - id: yarn-cache-path |
15 | | - run: echo "::set-output name=dir::$(yarn cache dir)" |
16 | | - |
17 | | - - name: Cache node modules |
18 | | - uses: actions/cache@v2 |
19 | | - id: yarn-cache |
20 | | - env: |
21 | | - cache-name: cache-node-modules |
| 13 | + - name: Set up Node |
| 14 | + uses: actions/setup-node@v4 |
22 | 15 | with: |
23 | | - path: ${{ steps.yarn-cache-path.outputs.dir }} |
24 | | - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
25 | | - restore-keys: | |
26 | | - ${{ runner.os }}-yarn- |
| 16 | + cache: yarn |
| 17 | + node-version: 18 |
27 | 18 |
|
28 | 19 | - name: Install dependencies |
29 | 20 | run: | |
30 | | - yarn install --cwd example --frozen-lockfile |
31 | | - yarn install --frozen-lockfile |
| 21 | + yarn install --frozen-lockfile --prefer-offline |
| 22 | + yarn install --cwd example --frozen-lockfile --prefer-offline |
32 | 23 |
|
33 | 24 | - name: Run linter |
34 | | - run: | |
35 | | - yarn lint |
| 25 | + run: yarn run lint |
36 | 26 | id: lint |
37 | 27 |
|
38 | 28 | type: |
39 | 29 | name: Run Type Checker |
40 | 30 | runs-on: ubuntu-latest |
41 | 31 |
|
42 | 32 | steps: |
43 | | - - uses: actions/checkout@v2 |
| 33 | + - uses: actions/checkout@v4 |
44 | 34 |
|
45 | | - - name: Get Yarn cache directory path |
46 | | - id: yarn-cache-path |
47 | | - run: echo "::set-output name=dir::$(yarn cache dir)" |
48 | | - |
49 | | - - name: Cache node modules |
50 | | - uses: actions/cache@v2 |
51 | | - id: yarn-cache |
52 | | - env: |
53 | | - cache-name: cache-node-modules |
| 35 | + - name: Set up Node |
| 36 | + uses: actions/setup-node@v4 |
54 | 37 | with: |
55 | | - path: ${{ steps.yarn-cache-path.outputs.dir }} |
56 | | - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
57 | | - restore-keys: | |
58 | | - ${{ runner.os }}-yarn- |
| 38 | + cache: yarn |
| 39 | + node-version: 18 |
59 | 40 |
|
60 | 41 | - name: Install dependencies |
61 | 42 | run: | |
62 | | - yarn install --cwd example --frozen-lockfile |
63 | | - yarn install --frozen-lockfile |
| 43 | + yarn install --frozen-lockfile --prefer-offline |
| 44 | + yarn install --cwd example --frozen-lockfile --prefer-offline |
64 | 45 |
|
65 | 46 | - name: Run type checker |
66 | | - run: | |
67 | | - yarn typescript |
| 47 | + run: yarn run typescript |
68 | 48 | id: type |
0 commit comments