3939 id : info
4040 uses : ./.github/actions/src/info
4141
42- - name : Echo Information about docserver
43- run : |
44- echo ${{ steps.info.outputs.docserver }}
45- echo ${{ fromJson(steps.info.outputs.docserver).changes }}
46-
47- - name : Echo Information about devserver
48- if : ${{ !steps.info.outputs.docserver.changes }}
49- run : echo ${{ steps.info.outputs.devserver }}
50-
5142 outputs :
5243 bundles : ${{ steps.info.outputs.bundles }}
5344 libs : ${{ steps.info.outputs.libs }}
@@ -56,187 +47,185 @@ jobs:
5647 docserver : ${{ steps.info.outputs.docserver }}
5748 workflows : ${{ steps.info.outputs.workflows }}
5849
59- # libraries:
60- # needs: find-packages
61- # strategy:
62- # fail-fast: false
63- # matrix:
64- # lib: ${{ fromJson(needs.find-packages.outputs.libs) }}
65- # os: ['ubuntu-latest', 'windows-latest']
66- # runs-on: ${{ matrix.os }}
67- # defaults:
68- # run:
69- # shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
70-
71- # name: ${{ matrix.lib.name }} library (${{ matrix.os }})
72-
73- # steps:
74- # - name: Check out source code
75- # if: matrix.lib.changes
76- # uses: actions/checkout@v4
77-
78- # - name: Initialize Repo
79- # if: matrix.lib.changes
80- # uses: ./.github/actions/src/init
81- # with:
82- # package-name: ${{ matrix.lib.name }}
83- # playwright: ${{ matrix.lib.changes && matrix.lib.needsPlaywright }}
84- # shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
85-
86- # # Only thing we really need to do on Windows is run tests
87- # - name: Run Tests
88- # if: matrix.lib.changes
89- # run: yarn workspaces foreach -A --include ${{ matrix.lib.name }} run test --coverage
90-
91- # - name: Run Auxillary Tasks
92- # if: matrix.lib.changes && matrix.os == 'ubuntu-latest'
93- # run: yarn workspaces foreach -A --include ${{ matrix.lib.name }} run tsc
94-
95- # tabs:
96- # runs-on: ubuntu-latest
97- # needs: find-packages
98- # strategy:
99- # fail-fast: false
100- # matrix:
101- # tabInfo: ${{ fromJson(needs.find-packages.outputs.tabs) }}
102- # name: ${{ matrix.tabInfo.tabName }} Tab
103- # steps:
104- # - name: Check out source code
105- # if: matrix.tabInfo.changes
106- # uses: actions/checkout@v4
107-
108- # - name: Initialize Repo
109- # if: matrix.tabInfo.changes
110- # uses: ./.github/actions/src/init
111- # with:
112- # package-name: ${{ matrix.tabInfo.name }}
113- # playwright: ${{ matrix.tabInfo.needsPlaywright && matrix.tabInfo.changes }}
114-
115- # - name: Build Tab
116- # if: matrix.tabInfo.changes
117- # run: |
118- # cd ${{ matrix.tabInfo.directory }}
119- # yarn build
120-
121- # - name: Upload Tab Artifact
122- # if: matrix.tabInfo.changes
123- # uses: actions/upload-artifact@v4
124- # with:
125- # name: ${{ matrix.tabInfo.tabName }} Tab
126- # path: ./build/tabs/${{ matrix.tabInfo.tabName }}.js
127-
128- # - name: Run Tests
129- # # https://github.com/vitest-dev/vitest/issues/5477
130- # # Known Vitest issue for coverage running in browser mode
131- # # Momentarily disable coverage checking on Github Actions for tabs
132- # if: matrix.tabInfo.changes
133- # run: |
134- # cd ${{ matrix.tabInfo.directory }}
135- # yarn test
136-
137- # - name: Run Auxillary Tasks
138- # if: matrix.tabInfo.changes
139- # run: |
140- # cd ${{ matrix.tabInfo.directory }}
141- # yarn tsc
142-
143- # bundles:
144- # runs-on: ubuntu-latest
145- # needs: find-packages
146- # strategy:
147- # fail-fast: false
148- # matrix:
149- # bundleInfo: ${{ fromJson(needs.find-packages.outputs.bundles) }}
150- # name: ${{ matrix.bundleInfo.bundleName }} Bundle
151- # steps:
152- # - name: Check out source code
153- # if: matrix.bundleInfo.changes
154- # uses: actions/checkout@v4
155-
156- # - name: Initialize Repo
157- # if: matrix.bundleInfo.changes
158- # uses: ./.github/actions/src/init
159- # with:
160- # package-name: ${{ matrix.bundleInfo.name }}
161- # playwright: ${{ matrix.bundleInfo.needsPlaywright }}
162-
163- # - name: Build Bundle
164- # if: matrix.bundleInfo.changes
165- # run: |
166- # cd ${{ matrix.bundleInfo.directory }}
167- # yarn build
168- # yarn tsc
169-
170- # - name: Upload Compiled Bundle Artifact
171- # if: matrix.bundleInfo.changes
172- # uses: actions/upload-artifact@v4
173- # with:
174- # name: ${{ matrix.bundleInfo.bundleName }} Compiled Bundle
175- # path: ./build/bundles/${{ matrix.bundleInfo.bundleName }}.js
176-
177- # - name: Build Bundle Docs
178- # if: matrix.bundleInfo.changes
179- # run: |
180- # cd ${{ matrix.bundleInfo.directory }}
181- # yarn buildtools build docs
182-
183- # - name: Upload Compiled Bundle Docs Artifact
184- # if: matrix.bundleInfo.changes
185- # uses: actions/upload-artifact@v4
186- # with:
187- # path: ${{ matrix.bundleInfo.directory }}/dist/docs.json
188- # name: ${{ matrix.bundleInfo.bundleName }} Docs
189-
190- # - name: Run Tests
191- # if: matrix.bundleInfo.changes
192- # run: |
193- # cd ${{ matrix.bundleInfo.directory }}
194- # yarn test --coverage
195-
196- # devserver:
197- # name: Dev Server Tasks
198- # runs-on: ubuntu-latest
199- # needs:
200- # - find-packages
201- # - bundles
202- # - tabs
203-
204- # if: ${{ needs.find-packages.outputs.devserver.changes }}
205-
206- # steps:
207- # - name: Check out source code
208- # uses: actions/checkout@v4
209-
210- # - name: Initialize Repo
211- # uses: ./.github/actions/src/init
212- # with:
213- # package-name: '@sourceacademy/modules-devserver'
214- # playwright: true
215-
216- # - name: Build all tabs
217- # run: yarn workspaces foreach -ptW --from "./src/tabs/*" run build
218-
219- # - name: Run tests
220- # run: |
221- # cd ./devserver
222- # yarn test --coverage
223-
224- # - name: Run Auxillary Tasks
225- # run: |
226- # cd ./devserver
227- # yarn tsc
50+ libraries :
51+ needs : find-packages
52+ strategy :
53+ fail-fast : false
54+ matrix :
55+ lib : ${{ fromJson(needs.find-packages.outputs.libs) }}
56+ os : ['ubuntu-latest', 'windows-latest']
57+ runs-on : ${{ matrix.os }}
58+ defaults :
59+ run :
60+ shell : ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
61+
62+ name : ${{ matrix.lib.name }} library (${{ matrix.os }})
63+
64+ steps :
65+ - name : Check out source code
66+ if : matrix.lib.changes
67+ uses : actions/checkout@v4
68+
69+ - name : Initialize Repo
70+ if : matrix.lib.changes
71+ uses : ./.github/actions/src/init
72+ with :
73+ package-name : ${{ matrix.lib.name }}
74+ playwright : ${{ matrix.lib.changes && matrix.lib.needsPlaywright }}
75+ shell : ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
76+
77+ # Only thing we really need to do on Windows is run tests
78+ - name : Run Tests
79+ if : matrix.lib.changes
80+ run : yarn workspaces foreach -A --include ${{ matrix.lib.name }} run test --coverage
81+
82+ - name : Run Auxillary Tasks
83+ if : matrix.lib.changes && matrix.os == 'ubuntu-latest'
84+ run : yarn workspaces foreach -A --include ${{ matrix.lib.name }} run tsc
85+
86+ tabs :
87+ runs-on : ubuntu-latest
88+ needs : find-packages
89+ strategy :
90+ fail-fast : false
91+ matrix :
92+ tabInfo : ${{ fromJson(needs.find-packages.outputs.tabs) }}
93+ name : ${{ matrix.tabInfo.tabName }} Tab
94+ steps :
95+ - name : Check out source code
96+ if : matrix.tabInfo.changes
97+ uses : actions/checkout@v4
98+
99+ - name : Initialize Repo
100+ if : matrix.tabInfo.changes
101+ uses : ./.github/actions/src/init
102+ with :
103+ package-name : ${{ matrix.tabInfo.name }}
104+ playwright : ${{ matrix.tabInfo.needsPlaywright && matrix.tabInfo.changes }}
105+
106+ - name : Build Tab
107+ if : matrix.tabInfo.changes
108+ run : |
109+ cd ${{ matrix.tabInfo.directory }}
110+ yarn build
111+
112+ - name : Upload Tab Artifact
113+ if : matrix.tabInfo.changes
114+ uses : actions/upload-artifact@v4
115+ with :
116+ name : ${{ matrix.tabInfo.tabName }} Tab
117+ path : ./build/tabs/${{ matrix.tabInfo.tabName }}.js
118+
119+ - name : Run Tests
120+ # https://github.com/vitest-dev/vitest/issues/5477
121+ # Known Vitest issue for coverage running in browser mode
122+ # Momentarily disable coverage checking on Github Actions for tabs
123+ if : matrix.tabInfo.changes
124+ run : |
125+ cd ${{ matrix.tabInfo.directory }}
126+ yarn test
127+
128+ - name : Run Auxillary Tasks
129+ if : matrix.tabInfo.changes
130+ run : |
131+ cd ${{ matrix.tabInfo.directory }}
132+ yarn tsc
133+
134+ bundles :
135+ runs-on : ubuntu-latest
136+ needs : find-packages
137+ strategy :
138+ fail-fast : false
139+ matrix :
140+ bundleInfo : ${{ fromJson(needs.find-packages.outputs.bundles) }}
141+ name : ${{ matrix.bundleInfo.bundleName }} Bundle
142+ steps :
143+ - name : Check out source code
144+ if : matrix.bundleInfo.changes
145+ uses : actions/checkout@v4
146+
147+ - name : Initialize Repo
148+ if : matrix.bundleInfo.changes
149+ uses : ./.github/actions/src/init
150+ with :
151+ package-name : ${{ matrix.bundleInfo.name }}
152+ playwright : ${{ matrix.bundleInfo.needsPlaywright }}
153+
154+ - name : Build Bundle
155+ if : matrix.bundleInfo.changes
156+ run : |
157+ cd ${{ matrix.bundleInfo.directory }}
158+ yarn build
159+ yarn tsc
160+
161+ - name : Upload Compiled Bundle Artifact
162+ if : matrix.bundleInfo.changes
163+ uses : actions/upload-artifact@v4
164+ with :
165+ name : ${{ matrix.bundleInfo.bundleName }} Compiled Bundle
166+ path : ./build/bundles/${{ matrix.bundleInfo.bundleName }}.js
167+
168+ - name : Build Bundle Docs
169+ if : matrix.bundleInfo.changes
170+ run : |
171+ cd ${{ matrix.bundleInfo.directory }}
172+ yarn buildtools build docs
173+
174+ - name : Upload Compiled Bundle Docs Artifact
175+ if : matrix.bundleInfo.changes
176+ uses : actions/upload-artifact@v4
177+ with :
178+ path : ${{ matrix.bundleInfo.directory }}/dist/docs.json
179+ name : ${{ matrix.bundleInfo.bundleName }} Docs
180+
181+ - name : Run Tests
182+ if : matrix.bundleInfo.changes
183+ run : |
184+ cd ${{ matrix.bundleInfo.directory }}
185+ yarn test --coverage
186+
187+ devserver :
188+ name : Dev Server Tasks
189+ runs-on : ubuntu-latest
190+ needs :
191+ - find-packages
192+ - bundles
193+ - tabs
194+
195+ if : ${{ fromJson( needs.find-packages.outputs.devserver) .changes }}
196+
197+ steps :
198+ - name : Check out source code
199+ uses : actions/checkout@v4
200+
201+ - name : Initialize Repo
202+ uses : ./.github/actions/src/init
203+ with :
204+ package-name : ' @sourceacademy/modules-devserver'
205+ playwright : true
206+
207+ - name : Build all tabs
208+ run : yarn workspaces foreach -ptW --from "./src/tabs/*" run build
209+
210+ - name : Run tests
211+ run : |
212+ cd ./devserver
213+ yarn test --coverage
214+
215+ - name : Run Auxillary Tasks
216+ run : |
217+ cd ./devserver
218+ yarn tsc
228219
229220 docserver :
230221 name : Docs Server Tasks
231222 runs-on : ubuntu-latest
232223 needs :
233- # - libraries
224+ - libraries
234225 - find-packages
226+ if : ${{ fromJson(needs.find-packages.outputs.docserver).changes }}
235227
236228 steps :
237- - name : Echo Information
238- run : echo ${{ fromJson(needs.find-packages.outputs.docserver).changes }}
239-
240229 - name : Check out source code
241230 uses : actions/checkout@v4
242231
0 commit comments