Skip to content

Commit aaa833e

Browse files
committed
try forking
1 parent 51e320b commit aaa833e

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/tests.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,19 @@ jobs:
216216

217217
- name: Run test task
218218
run: |
219+
alias run-tests="npx jest --color ${{ format('--coverage={0} --maxWorkers=2 --selectProjects "{1}"', matrix.task.coverage || false, join(matrix.task.projects, '", "')) }}"
220+
219221
# Ubuntu requires a profile for developer builds of Chrome to run without errors.
220222
# (https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md)
221223
IS_UBUNTU="${{ matrix.runner.name == 'Ubuntu' }}"
222224
# Puppeteer uses Chrome to execute tests.
223225
USES_PUPPETEER="${{ matrix.task.puppeteer || false }}"
224-
SHOULD_USE_APP_ARMOR_PROFILE=(IS_UBUNTU && USES_PUPPETEER)
225-
${{ SHOULD_USE_APP_ARMOR_PROFILE && 'aa-exec --profile=chrome \\' || '' }}
226-
npx jest --color ${{ format('--coverage={0} --maxWorkers=2 --selectProjects "{1}"', matrix.task.coverage || false, join(matrix.task.projects, '", "')) }}
226+
227+
if [[ IS_UBUNTU ]] && [[ USES_PUPPETEER ]]; then
228+
aa-exec --profile=chrome run-tests
229+
else
230+
run-tests
231+
fi
227232
228233
- name: Save test coverage
229234
uses: actions/upload-artifact@v7.0.1

0 commit comments

Comments
 (0)