Organize files #52
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- "dev/-/**" | |
paths: | |
- "src/**" | |
- "package-lock.json" | |
- "!**.md" | |
jobs: | |
test: | |
name: 📑 Test | |
runs-on: ubuntu-latest | |
steps: | |
- run: sudo apt-get update | |
- name: 🛠️ Install OS packages | |
uses: awalsh128/cache-apt-pkgs-action@latest | |
with: | |
packages: xvfb libnss3 libatk-bridge2.0-0 libgtk-3-0 libgbm1 libasound2 | |
version: 1.0 | |
- name: 📥 Checkout | |
uses: actions/checkout@v4 | |
- name: ⚙️ Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
cache: npm | |
- name: 🛠️ Install dependencies | |
run: npm install | |
- name: Get VS Code | |
run: curl --silent --output vscode-stable-versions.json https://update.code.visualstudio.com/api/releases/stable | |
- uses: actions/cache@v4 | |
with: | |
path: .vscode-test/ | |
key: ${{ runner.os }}-vscode-test-${{ hashFiles('vscode-stable-versions.json') }} | |
restore-keys: ${{ runner.os }}-vscode-test- | |
- name: ⚡ Run headless test | |
run: | | |
[ ! -e /run/dbus ] && sudo mkdir /run/dbus | |
dbus-daemon --session --address=unix:path=/run/dbus/system_bus_socket --nofork & | |
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket xvfb-run npm test | |
ps aux | grep -e [t]mp/xvfb-run -e [d]bus-daemon | awk '{print $2}' | sudo xargs kill || true |