Remove editorLangId condition to allow extension usage with languages other than Markdown #83
Workflow file for this run
This file contains hidden or 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: | |
| - name: Check xvfb-run is available | |
| id: check_xvfb | |
| run: echo "result=$(hash xvfb-run 2>/dev/null && echo 1 || echo 0)" >> $GITHUB_OUTPUT | |
| - run: sudo apt-get update | |
| if: steps.check_xvfb.outputs.result == 0 | |
| - name: 🛠️ Install OS packages | |
| if: steps.check_xvfb.outputs.result == 0 | |
| 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 | |
| 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 |