-
Notifications
You must be signed in to change notification settings - Fork 12
37 lines (34 loc) · 1.08 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Test
on: [pull_request, workflow_call]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Install and test
run: |
npm ci --loglevel error
npm run build
npm run test
- name: Start dbus
run: |
sudo service dbus start
export XDG_RUNTIME_DIR=/tmp/xdg_runtime
mkdir $XDG_RUNTIME_DIR
chmod 700 $XDG_RUNTIME_DIR
chown $(id -un):$(id -gn) $XDG_RUNTIME_DIR
export DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> "$GITHUB_ENV"
dbus-daemon --session --address=$DBUS_SESSION_BUS_ADDRESS --nofork --nopidfile --syslog-only &
- name: Run integration test
uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a
with:
run: npm run integration
env:
CI: true