@@ -5,80 +5,38 @@ on: [push]
5
5
jobs :
6
6
type-check :
7
7
runs-on : ubuntu-latest
8
-
9
8
steps :
10
- - uses : actions/checkout@v1
11
- name : Checkout
12
-
13
- - uses : actions/setup-node@v1
14
- name : Setup node.js and yarn
15
- with :
16
- node-version : 16.13.1
17
-
18
- - name : Get yarn cache directory
19
- id : yarn-cache-get-dir
20
- run : echo "::set-output name=dir::$(yarn cache dir)"
21
-
22
- - uses : actions/cache@v1
23
- id : yarn-cache
24
- name : Restore yarn cache
25
- with :
26
- path : ${{ steps.yarn-cache-get-dir.outputs.dir }}
27
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
28
- restore-keys : |
29
- ${{ runner.os }}-yarn-
30
-
31
- - name : Yarn install
32
- run : yarn install --frozen-lockfile
9
+ - uses : actions/checkout@v3
10
+ - uses : ./.github/workflows/actions/prepare
33
11
34
- - uses : actions/cache@v1
35
- id : typescript-cache
12
+ - id : typescript-cache
36
13
name : Restore TypeScript cache
14
+ uses : actions/cache@v1
37
15
with :
38
- path : .sewing-kit/cache/typescript/
39
- key : ${{ runner.os }}-typescript-v5-${{ github.sha }}
16
+ path : |
17
+ packages/*/build/ts
18
+ packages/*/build/*.tsbuildinfo
19
+ key : ${{ runner.os }}-typescript-v1-${{ github.sha }}
40
20
restore-keys : |
41
- ${{ runner.os }}-typescript-v5 -
21
+ ${{ runner.os }}-typescript-v1 -
42
22
43
23
- name : Type check
44
24
run : yarn type-check
45
25
46
26
test :
47
27
runs-on : ubuntu-latest
48
-
49
28
steps :
50
- - uses : actions/checkout@v1
51
- name : Checkout
52
-
53
- - uses : actions/setup-node@v1
54
- name : Setup node.js and yarn
55
- with :
56
- node-version : 16.13.1
57
-
58
- - name : Get yarn cache directory
59
- id : yarn-cache-get-dir
60
- run : echo "::set-output name=dir::$(yarn cache dir)"
29
+ - uses : actions/checkout@v3
30
+ - uses : ./.github/workflows/actions/prepare
61
31
62
- - uses : actions/cache@v1
63
- id : yarn-cache
64
- name : Restore yarn cache
65
- with :
66
- path : ${{ steps.yarn-cache-get-dir.outputs.dir }}
67
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
68
- restore-keys : |
69
- ${{ runner.os }}-yarn-
70
-
71
- - name : Yarn install
72
- run : yarn install --frozen-lockfile
73
-
74
- - uses : actions/cache@v1
75
- id : jest-cache
32
+ - id : jest-cache
76
33
name : Restore jest cache
34
+ uses : actions/cache@v1
77
35
with :
78
- path : .sewing-kit /cache/jest/
79
- key : ${{ runner.os }}-jest-${{ github.sha }}
36
+ path : .loom /cache/jest/
37
+ key : ${{ runner.os }}-jest-v1- ${{ github.sha }}
80
38
restore-keys : |
81
- ${{ runner.os }}-jest-
39
+ ${{ runner.os }}-jest-v1-
82
40
83
41
- name : Test
84
42
run : yarn test
@@ -87,38 +45,17 @@ jobs:
87
45
runs-on : ubuntu-latest
88
46
89
47
steps :
90
- - uses : actions/checkout@v1
91
- name : Checkout
92
-
93
- - uses : actions/setup-node@v1
94
- name : Setup node.js and yarn
95
- with :
96
- node-version : 16.13.1
97
-
98
- - name : Get yarn cache directory
99
- id : yarn-cache-get-dir
100
- run : echo "::set-output name=dir::$(yarn cache dir)"
101
-
102
- - uses : actions/cache@v1
103
- id : yarn-cache
104
- name : Restore yarn cache
105
- with :
106
- path : ${{ steps.yarn-cache-get-dir.outputs.dir }}
107
- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
108
- restore-keys : |
109
- ${{ runner.os }}-yarn-
110
-
111
- - name : Yarn install
112
- run : yarn install --frozen-lockfile
48
+ - uses : actions/checkout@v3
49
+ - uses : ./.github/workflows/actions/prepare
113
50
114
- - uses : actions/cache@v1
115
- id : eslint-cache
51
+ - id : eslint-cache
116
52
name : Restore ESLint cache
53
+ uses : actions/cache@v1
117
54
with :
118
- path : .sewing-kit /cache/eslint
119
- key : ${{ runner.os }}-eslint-${{ github.sha }}
55
+ path : .loom /cache/eslint
56
+ key : ${{ runner.os }}-eslint-v1- ${{ github.sha }}
120
57
restore-keys : |
121
- ${{ runner.os }}-eslint-
58
+ ${{ runner.os }}-eslint-v1-
122
59
123
60
- name : Lint
124
61
run : yarn lint
0 commit comments