-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (44 loc) · 1.42 KB
/
tests.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Testing
on:
push:
branches:
- main
# Trigger each time HEAD branch is updated in a pull request
# see https://github.com/orgs/community/discussions/26366
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
jobs:
test:
# Adapted from:
# https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions
name: Integration tests
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x # LTS until Oct 2025
- run: npm install
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13' # end of support: 2029-10
- name: Install other dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt install libpango1.0-dev -y
fi
shell: bash
# The xvfb-run command starts an X virtual framebuffer (Xvfb) server,
# which emulates a display server without requiring a physical display.
- name: Run tests (with xvfb)
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- name: Run tests (without xvfb)
run: npm test
if: runner.os != 'Linux'