Skip to content

Test: Full Suite (Ubuntu) #64

Test: Full Suite (Ubuntu)

Test: Full Suite (Ubuntu) #64

name: "Positron: Full Test Suite"
# Run tests daily at 4am UTC (11p EST) on weekdays for now, or manually
on:
schedule:
- cron: "0 4 * * 1-5"
workflow_dispatch:
jobs:
linux:
name: Tests on Linux
runs-on: ubuntu-latest
timeout-minutes: 60
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
POSITRON_BUILD_NUMBER: 0 # CI skips building releases
steps:
- uses: actions/checkout@v4
- name: Setup Build Environment
run: |
sudo apt-get update
sudo apt-get install -y vim curl build-essential clang make cmake git r-base-dev python3-pip python-is-python3 libsodium-dev libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1 libnss3 libnspr4 libasound2 libkrb5-dev
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
sudo service xvfb start
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Execute yarn
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
POSITRON_GITHUB_PAT: ${{ secrets.POSITRON_GITHUB_PAT }}
run: |
# Install Yarn
npm install -g yarn
# Install node-gyp; this is required by some packages, and yarn
# sometimes fails to automatically install it.
yarn global add node-gyp
# Perform the main yarn command; this installs all Node packages and
# dependencies
yarn --immutable --network-timeout 120000
- name: Compile and Download
run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" playwright-install download-builtin-extensions
- name: Compile Integration Tests
run: yarn --cwd test/integration/browser compile
- name: Compile Smoke Tests
run: yarn --cwd test/smoke compile
- name: Run Unit Tests (Electron)
id: electron-unit-tests
run: DISPLAY=:10 ./scripts/test.sh
- name: Run Unit Tests (node.js)
id: nodejs-unit-tests
run: yarn test-node
- name: Run Unit Tests (Browser, Chromium)
id: browser-unit-tests
run: DISPLAY=:10 yarn test-browser-no-install --browser chromium
- name: Run Integration Tests (Electron)
id: electron-integration-tests
run: DISPLAY=:10 ./scripts/test-integration.sh
- name: Run Integration Tests (Remote)
id: electron-remote-integration-tests
timeout-minutes: 15
run: DISPLAY=:10 ./scripts/test-remote-integration.sh
# - name: Run Integration Tests (Browser, Chromium)
# id: browser-integration-tests
# run: DISPLAY=:10 ./scripts/test-web-integration.sh --browser chromium
- name: Run Smoke Tests (Electron)
id: electron-smoke-tests
run: DISPLAY=:10 yarn smoketest-no-compile --tracing