Skip to content

Commit e307a5b

Browse files
authored
Update test.yml
1 parent 2201bb0 commit e307a5b

File tree

1 file changed

+36
-30
lines changed

1 file changed

+36
-30
lines changed

.github/workflows/test.yml

Lines changed: 36 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -154,36 +154,42 @@ jobs:
154154

155155
# UI TESTS
156156
test-ui-linux:
157-
name: UI Test ${{ matrix.version }}-linux
158-
needs: build-linux
159-
runs-on: ubuntu-latest
160-
strategy:
161-
fail-fast: false
162-
matrix:
163-
version: [R2021b, R2022a, R2022b, latest]
164-
steps:
165-
- *checkout
166-
- *download-linux-build-artifacts
167-
- *setup-MATLAB
168-
- *setup-node
169-
- *install-dependencies
170-
- name: Clean up VSCode test resources
171-
run: rm -rf .vscode-test/test-resources
172-
- &run-ui-tests
173-
name: Run UI tests
174-
run: npm run test-ui
175-
env:
176-
MLM_WEB_LICENSE: true
177-
MLM_WEB_ID: ${{ secrets.MLM_WEB_ID }}
178-
MLM_WEB_USER_CRED: ${{ secrets.MLM_WEB_USER_CRED }}
179-
- name: Upload Screenshots
180-
uses: actions/upload-artifact@v4
181-
if: always()
182-
with:
183-
name: screenshots-linux-${{ matrix.version }}
184-
path: .vscode-test/test-resources/screenshots
185-
if-no-files-found: ignore
186-
157+
name: UI Test ${{ matrix.version }}-linux
158+
needs: build-linux
159+
runs-on: ubuntu-latest
160+
strategy:
161+
fail-fast: false
162+
matrix:
163+
version: [R2021b, R2022a, R2022b, latest]
164+
steps:
165+
- *checkout
166+
- *download-linux-build-artifacts
167+
- *setup-MATLAB
168+
- *setup-node
169+
- *install-dependencies
170+
- name: Set unique test resources dir
171+
run: echo "TEST_RESOURCES_DIR=.vscode-test/test-resources-${{ matrix.version }}-${{ github.run_id }}" >> $GITHUB_ENV
172+
- name: Clean up VSCode test resources
173+
run: rm -rf $TEST_RESOURCES_DIR
174+
- name: Kill leftover Chrome/VSCode processes
175+
run: |
176+
pkill -f chrome || true
177+
pkill -f vscode || true
178+
- name: Run UI tests
179+
run: npm run test-ui
180+
env:
181+
MLM_WEB_LICENSE: true
182+
MLM_WEB_ID: ${{ secrets.MLM_WEB_ID }}
183+
MLM_WEB_USER_CRED: ${{ secrets.MLM_WEB_USER_CRED }}
184+
TEST_RESOURCES_DIR: ${{ env.TEST_RESOURCES_DIR }}
185+
- name: Upload Screenshots
186+
uses: actions/upload-artifact@v4
187+
if: always()
188+
with:
189+
name: screenshots-linux-${{ matrix.version }}
190+
path: ${{ env.TEST_RESOURCES_DIR }}/screenshots
191+
if-no-files-found: ignore
192+
187193
test-ui-windows:
188194
name: UI Test ${{ matrix.version }}-windows
189195
needs: build-windows

0 commit comments

Comments
 (0)