mirror of
https://github.com/Foundry376/Mailspring.git
synced 2026-11-25 13:18:33 +01:00
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Install system dependencies
|
|
env:
|
|
DEBIAN_FRONTEND: noninteractive
|
|
run: |
|
|
sudo apt-get update -y
|
|
sudo apt-get install -y \
|
|
xvfb \
|
|
dbus-x11 \
|
|
libgbm1 \
|
|
libnss3 \
|
|
libasound2t64 \
|
|
libatk1.0-0t64 \
|
|
libatk-bridge2.0-0t64 \
|
|
libgtk-3-0t64
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run lint
|
|
run: npm run lint:check
|
|
|
|
- name: Run Typecheck
|
|
run: npm run typecheck
|
|
|
|
# Ubuntu 23.10+ restricts unprivileged user namespaces through AppArmor, so
|
|
# Electron cannot use its namespace sandbox and falls back to the SUID helper,
|
|
# which is not setuid root inside node_modules. Re-allow the namespace sandbox
|
|
# rather than passing --no-sandbox, so the tests run the way the app ships.
|
|
- name: Allow Electron's namespace sandbox
|
|
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
|
|
|
- name: Run tests
|
|
run: dbus-launch --exit-with-session xvfb-run -a npm test
|
|
timeout-minutes: 20
|