Skip to content

Commit

Permalink
Fix the Test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-nelson committed Jan 29, 2025
1 parent 3c8f384 commit 0a3fdfe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/npm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- run: npm test
- run: ls && pwd
- run: ./scripts/apparmorfix.sh
18 changes: 18 additions & 0 deletions .github/workflows/scripts/apparmorfix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
set -e

echo '::group::πŸ”—πŸ’€ Setting up Chrome Linux Sandbox'
# Based on the instructions found here: https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
if [ "$(lsb_release -rs)" = "24.04" ]; then
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
echo 'Done'
fi
echo '::endgroup::'

echo '::group::πŸ”—πŸ’€ Installing NPM packages'
npm ci
echo '::endgroup::'

echo '::group::πŸ”—πŸ’€ Running tests'
npm run test
echo '::endgroup::'

0 comments on commit 0a3fdfe

Please sign in to comment.