@@ -6,10 +6,6 @@ concurrency:
66 group : ' ${{ github.workflow }} - ${{ github.head_ref || github.ref }}'
77 cancel-in-progress : true
88
9- defaults :
10- run :
11- shell : bash
12-
139jobs :
1410 check-lint-and-formatting :
1511 name : Check lint and formatting with Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
1915 fail-fast : false
2016
2117 matrix :
22- node-version : [22]
18+ node-version : [22, latest ]
2319 os : [ubuntu-latest]
2420
2521 steps :
@@ -40,12 +36,33 @@ jobs:
4036 - name : Lint files
4137 run : yarn workspaces foreach -Ap -j unlimited run lint
4238
39+ test-types :
40+ name : Test types with TypeScript ${{ matrix.ts }} on ${{ matrix.os }} and Node.js ${{ matrix.node-version }}
41+ runs-on : ${{ matrix.os }}
42+
43+ strategy :
44+ fail-fast : false
45+
46+ matrix :
47+ node-version : [22, latest]
48+ os : [ubuntu-latest]
49+ ts : [5.3, 5.4, 5.5, 5.6, 5.7, 5.8]
50+
51+ steps :
52+ - name : Checkout repository
53+ uses : actions/checkout@v4
54+
55+ - name : Setup Node.js ${{ matrix.node-version }} and Install dependencies on ${{ matrix.os }}
56+ uses : ./.github/actions/prepare
57+ with :
58+ node-version : ${{ matrix.node-version }}
59+
60+ - name : Install TypeScript ${{ matrix.ts }}
61+ run : yarn up typescript@${{ matrix.ts }}
62+
4363 - name : Run type tests
4464 run : yarn workspaces foreach -Ap -j unlimited run test-types
4565
46- - name : Run publint
47- run : yarn workspaces foreach -Ap -j unlimited run check-package-json
48-
4966 build :
5067 name : Build ${{ matrix.package.name }} with Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
5168 runs-on : ${{ matrix.os }}
5572
5673 matrix :
5774 node-version : [18, 20, 22, latest]
58- os : [ubuntu-latest, windows-latest]
75+ os : [ubuntu-latest, windows-latest, macos-latest ]
5976 package :
6077 [
6178 { directory: 'eslint', name: '@aryaemami59/eslint-config' },
@@ -106,7 +123,7 @@ jobs:
106123 { directory: 'typescript', name: '@aryaemami59/tsconfig' },
107124 { directory: 'vitest', name: '@aryaemami59/vitest-config' },
108125 ]
109- os : [ubuntu-latest, windows-latest]
126+ os : [ubuntu-latest, windows-latest, macos-latest ]
110127
111128 steps :
112129 - name : Checkout repository
@@ -149,7 +166,7 @@ jobs:
149166 fail-fast : false
150167
151168 matrix :
152- node-version : [22]
169+ node-version : [22, latest ]
153170 package :
154171 [
155172 { directory: 'eslint', name: '@aryaemami59/eslint-config' },
@@ -178,7 +195,51 @@ jobs:
178195 run : ls -l .
179196
180197 - name : Run are-the-types-wrong for ${{ matrix.package.name }} with Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
181- run : npx @arethetypeswrong/cli@latest packages/${{ matrix.package.directory }}/package.tgz --format table
198+ run : yarn attw packages/${{ matrix.package.directory }}/package.tgz --format table
199+
200+ - name : Did we fail?
201+ if : failure()
202+ run : ls -R
203+
204+ publint :
205+ name : Check if the package.json for ${{ matrix.package.name }} is correct with Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
206+ runs-on : ${{ matrix.os }}
207+ needs : [build]
208+
209+ strategy :
210+ fail-fast : false
211+
212+ matrix :
213+ node-version : [22, latest]
214+ package :
215+ [
216+ { directory: 'eslint', name: '@aryaemami59/eslint-config' },
217+ { directory: 'prettier', name: '@aryaemami59/prettier-config' },
218+ { directory: 'typescript', name: '@aryaemami59/tsconfig' },
219+ { directory: 'vitest', name: '@aryaemami59/vitest-config' },
220+ ]
221+ os : [ubuntu-latest]
222+
223+ steps :
224+ - name : Checkout repository
225+ uses : actions/checkout@v4
226+
227+ - name : Setup Node.js ${{ matrix.node-version }} and Install dependencies on ${{ matrix.os }}
228+ uses : ./.github/actions/prepare
229+ with :
230+ node-version : ${{ matrix.node-version }}
231+
232+ - name : Download build artifact for ${{ matrix.package.name }} with Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
233+ uses : actions/download-artifact@v4
234+ with :
235+ name : ${{ matrix.package.directory }}-${{ matrix.node-version }}-${{ matrix.os }}
236+ path : packages/${{ matrix.package.directory }}
237+
238+ - name : Display folder structure
239+ run : ls -l .
240+
241+ - name : Run publint for ${{ matrix.package.name }} with Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
242+ run : yarn packages/${{ matrix.package.directory }} run publint --strict ./package.tgz
182243
183244 - name : Did we fail?
184245 if : failure()
0 commit comments