1717 - name : Check out source code
1818 uses : actions/checkout@v5
1919
20- - name : Initialize Repo
20+ - name : Initialize Github Actions
2121 uses : ./.github/actions/src/init
2222 with :
2323 package-name : ' @sourceacademy/modules-github-actions'
6363
6464 steps :
6565 - name : Check out source code
66- if : matrix.lib.changes
6766 uses : actions/checkout@v5
6867
69- - name : Initialize Repo
70- if : matrix.lib.changes
68+ - name : Initialize ${{ matrix.lib.name }}
7169 uses : ./.github/actions/src/init
7270 with :
7371 package-name : ${{ matrix.lib.name }}
@@ -76,15 +74,15 @@ jobs:
7674
7775 # Only thing we really need to do on Windows is run tests (without coverage)
7876 - name : Run Tests (Windows)
79- if : matrix.lib.changes && matrix. os == 'windows-latest'
77+ if : matrix.os == 'windows-latest'
8078 run : yarn workspaces foreach -A --include ${{ matrix.lib.name }} run test
8179
8280 - name : Run Tests (Ubuntu)
83- if : matrix.lib.changes && matrix. os == 'ubuntu-latest'
81+ if : matrix.os == 'ubuntu-latest'
8482 run : yarn workspaces foreach -A --include ${{ matrix.lib.name }} run test --coverage
8583
8684 - name : Run Auxillary Tasks
87- if : matrix.lib.changes && matrix. os == 'ubuntu-latest'
85+ if : matrix.os == 'ubuntu-latest'
8886 run : yarn workspaces foreach -A --include ${{ matrix.lib.name }} run tsc
8987
9088 tabs :
@@ -97,24 +95,20 @@ jobs:
9795 name : ${{ matrix.tabInfo.tabName }} Tab
9896 steps :
9997 - name : Check out source code
100- if : matrix.tabInfo.changes
10198 uses : actions/checkout@v5
10299
103- - name : Initialize Repo
104- if : matrix.tabInfo.changes
100+ - name : Initialize ${{ matrix.tabInfo.tabName }}
105101 uses : ./.github/actions/src/init
106102 with :
107103 package-name : ${{ matrix.tabInfo.name }}
108104 playwright : ${{ matrix.tabInfo.needsPlaywright && matrix.tabInfo.changes }}
109105
110106 - name : Build Tab
111- if : matrix.tabInfo.changes
112107 run : |
113108 cd ${{ matrix.tabInfo.directory }}
114109 yarn build
115110
116111 - name : Upload Tab Artifact
117- if : matrix.tabInfo.changes
118112 uses : actions/upload-artifact@v4
119113 with :
120114 name : ${{ matrix.tabInfo.tabName }}-tab
@@ -124,13 +118,11 @@ jobs:
124118 # https://github.com/vitest-dev/vitest/issues/5477
125119 # Known Vitest issue for coverage running in browser mode
126120 # Momentarily disable coverage checking on Github Actions for tabs
127- if : matrix.tabInfo.changes
128121 run : |
129122 cd ${{ matrix.tabInfo.directory }}
130123 yarn test
131124
132125 - name : Run Auxillary Tasks
133- if : matrix.tabInfo.changes
134126 run : |
135127 cd ${{ matrix.tabInfo.directory }}
136128 yarn tsc
@@ -145,31 +137,26 @@ jobs:
145137 name : ${{ matrix.bundleInfo.bundleName }} Bundle
146138 steps :
147139 - name : Check out source code
148- if : matrix.bundleInfo.changes
149140 uses : actions/checkout@v5
150141
151- - name : Initialize Repo
152- if : matrix.bundleInfo.changes
142+ - name : Initialize ${{ matrix.bundleInfo.name }}
153143 uses : ./.github/actions/src/init
154144 with :
155145 package-name : ${{ matrix.bundleInfo.name }}
156146 playwright : ${{ matrix.bundleInfo.needsPlaywright }}
157147
158148 - name : Build Bundle
159- if : matrix.bundleInfo.changes
160149 run : |
161150 cd ${{ matrix.bundleInfo.directory }}
162151 yarn build
163152 yarn tsc
164153
165154 - name : Build Bundle Docs
166- if : matrix.bundleInfo.changes
167155 run : |
168156 cd ${{ matrix.bundleInfo.directory }}
169157 yarn buildtools build docs
170158
171159 - name : Run Tests
172- if : matrix.bundleInfo.changes
173160 run : |
174161 cd ${{ matrix.bundleInfo.directory }}
175162 yarn test --coverage
0 commit comments