|
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 type |
| 47 | + run: yarn run type |
68 | 48 | id: type |
69 | | - |
70 | | - test: |
71 | | - name: Run Unit Tests |
72 | | - runs-on: ubuntu-latest |
73 | | - |
74 | | - steps: |
75 | | - - uses: actions/checkout@v2 |
76 | | - |
77 | | - - name: Get Yarn cache directory path |
78 | | - id: yarn-cache-path |
79 | | - run: echo "::set-output name=dir::$(yarn cache dir)" |
80 | | - |
81 | | - - name: Cache node modules |
82 | | - uses: actions/cache@v2 |
83 | | - id: yarn-cache |
84 | | - env: |
85 | | - cache-name: cache-node-modules |
86 | | - with: |
87 | | - path: ${{ steps.yarn-cache-path.outputs.dir }} |
88 | | - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
89 | | - restore-keys: | |
90 | | - ${{ runner.os }}-yarn- |
91 | | -
|
92 | | - - name: Install dependencies |
93 | | - run: | |
94 | | - yarn install --cwd example --frozen-lockfile |
95 | | - yarn install --frozen-lockfile |
96 | | -
|
97 | | - - name: Run unit tests |
98 | | - run: | |
99 | | - yarn test |
100 | | - id: test |
0 commit comments