Skip to content

ci: Add E2E test

ci: Add E2E test #133

Workflow file for this run

name: Build, Lint, Test and possibly release
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [ "published" ]
schedule:
- cron: '0 0 * * 0'
permissions:
contents: read
jobs:
build-lint-test-release:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout Source
uses: actions/checkout@v2
- name: Install Node 20
uses: actions/setup-node@v1
with:
node-version: 20
- name: Install Dependencies
run: npm ci
- name: Check for vulnerabilities
run: npm audit
- name: Run Linter
run: npm run lint
- name: Build Code
run: npm run compile
- name: Test server
working-directory: server
run: npm run test
- name: Cache vscode binary
uses: actions/cache@v3
with:
path: ~/.vscode-test
key: ${{ runner.os }}-vscode-test
- name: Setup d-bus / Xvfb
run: |
sudo apt-get install -y dbus-x11
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Test E2E
run: xvfb-run -a npm run test
env:
DISPLAY: ':99.0'
- name: Publish
if: success() && startsWith(github.ref, 'refs/tags/')
run: npm run deploy
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
OVSX_PAT: ${{ secrets.OVSX_PAT }}