Skip to content

Commit 90c0ebf

Browse files
committed
Add input to JavaScript test workflow.
1 parent aaf760c commit 90c0ebf

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/javascript-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
# Runs the WordPress Core JavaScript tests.
4848
test-js:
4949
name: QUnit Tests
50-
uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-tests.yml@trunk
50+
uses: ./.github/workflows/reusable-javascript-tests.yml
5151
permissions:
5252
contents: read
5353
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}

.github/workflows/reusable-javascript-tests.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ name: JavaScript tests
55

66
on:
77
workflow_call:
8+
inputs:
9+
old-branch:
10+
description: 'Whether an old branch of WordPress is being tested.'
11+
required: false
12+
type: 'boolean'
13+
default: false
814

915
jobs:
1016
# Runs the QUnit test suite.
@@ -44,6 +50,12 @@ jobs:
4450
- name: Install npm Dependencies
4551
run: npm ci
4652

53+
# See https://issues.chromium.org/issues/373753919
54+
# and https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
55+
- name: Disable AppArmor
56+
if: ${{ inputs.old-branch }}
57+
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
58+
4759
- name: Run QUnit tests
4860
run: npm run grunt qunit:compiled
4961

0 commit comments

Comments
 (0)