Skip to content

Commit

Permalink
extract workaround into separate CI step
Browse files Browse the repository at this point in the history
  • Loading branch information
djelinek committed Nov 1, 2024
1 parent 2604eef commit 0d2be7e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
coverage:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest

env:
CODE_TYPE: stable
Expand All @@ -39,11 +39,12 @@ jobs:
- name: 🔧 Install - Test Project
run: npm install --workspace=extester-test

- name: ⚙️ Allow unprivileged user namespace (ubuntu)
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: 📊 Run Tests with Coverage enabled
# 'set +e' and 'exit 0' - that means the workflow will not fail even the test failures are present. The failing tests are not directive for the code coverage reports itself
run: |
# allow unprivileged user namespace
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
set +e
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm run test:coverage
exit 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

check:
if: always()
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
name: 🚦 Status Check
needs: [test]
steps:
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/template-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,16 @@ jobs:
run: npm install --workspace=extester-test

- name: 🔍 Run Tests (macOS, windows)
if: matrix.os != 'ubuntu-24.04'
if: ${{ ! startsWith(matrix.os, 'ubuntu') }}
run: npm test

- name: ⚙️ Allow unprivileged user namespace (ubuntu)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: 🔍 Run Tests (linux)
if: matrix.os == 'ubuntu-24.04'
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
# allow unprivileged user namespace
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
xvfb-run --auto-servernum --server-args='-screen 0 1920x1080x24' npm test
- name: 💾 Upload Screenshots
Expand Down

0 comments on commit 0d2be7e

Please sign in to comment.