3939 - run : pnpm install --frozen-lockfile --prefer-offline
4040
4141 build :
42- name : Build & check exports
42+ name : Build
4343 needs : [deps]
4444 runs-on : ubuntu-latest
4545 steps :
6969 test-unit :
7070 name : Test - Unit
7171 needs : [deps]
72- uses : ./.github/workflows/base.yml
73- with :
74- command : npm run test:unit
75-
76- test-integration :
77- name : Test - Integration
7872 runs-on : ubuntu-latest
79- needs : [deps, build]
8073 steps :
8174 - uses : actions/checkout@v4
8275
@@ -92,61 +85,43 @@ jobs:
9285 path : node_modules/
9386 key : ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
9487
95- - name : Cache restore build
96- uses : actions/cache/restore@v4
88+ - run : npm run test:unit
89+
90+ - uses : actions/upload-artifact@v4
9791 with :
98- fail-on-cache-miss : true
99- path : dist/
100- key : ${{ runner.os }}-build-${{ github.sha }}
92+ name : coverage
93+ path : coverage/
10194
102- - run : npm run test:integration
95+ test-integration :
96+ name : Test - Integration
97+ uses : ./.github/workflows/shared/base-1.yml
98+ with :
99+ command : npm run test:integration
103100
104101 check-exports :
105102 name : Check exports
106- runs-on : ubuntu-latest
107- needs : [deps, build]
108- steps :
109- - uses : actions/checkout@v4
110-
111- - name : Setup Node.js
112- uses : actions/setup-node@v4
113- with :
114- node-version : ' 22.x'
115-
116- - name : Cache restore node_modules
117- uses : actions/cache/restore@v4
118- with :
119- fail-on-cache-miss : true
120- path : node_modules/
121- key : ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
122-
123- - name : Cache restore build
124- uses : actions/cache/restore@v4
125- with :
126- fail-on-cache-miss : true
127- path : dist/
128- key : ${{ runner.os }}-build-${{ github.sha }}
129-
130- - run : npm run check-exports
103+ uses : ./.github/workflows/shared/base-1.yml
104+ with :
105+ command : npm run check-exports
131106
132107 lint :
133108 name : Lint
134109 needs : [deps]
135- uses : ./.github/workflows/base.yml
110+ uses : ./.github/workflows/shared/ base-2 .yml
136111 with :
137112 command : npm run lint
138113
139114 check-format :
140115 name : Check format
141116 needs : [deps]
142- uses : ./.github/workflows/base.yml
117+ uses : ./.github/workflows/shared/ base-2 .yml
143118 with :
144119 command : npm run check-format
145120
146121 check-spelling :
147122 name : Check spelling
148123 needs : [deps]
149- uses : ./.github/workflows/base.yml
124+ uses : ./.github/workflows/shared/ base-2 .yml
150125 with :
151126 command : npm run check-spelling
152127
0 commit comments