Test: E2E (Latest Release) #4
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
name: "Test: E2E (Latest Release)" | |
on: | |
workflow_dispatch: | |
inputs: | |
grep: | |
required: false | |
description: "Grep filter to apply to the e2e tests: @critical, @console, etc. Leave blank to run all tests." | |
default: "" | |
type: string | |
notify_on: | |
description: "Slack notification on:" | |
required: false | |
default: "failure" | |
type: choice | |
options: | |
- failure | |
- always | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
e2e-electron: | |
runs-on: ubuntu-latest-8x | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Install Build Dependencies | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
vim curl build-essential clang make cmake git \ | |
libsodium-dev libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb \ | |
libgtk-3-0 libgbm1 libnss3 libnspr4 libasound2 libkrb5-dev libcairo-dev \ | |
libsdl-pango-dev libjpeg-dev libgif-dev pandoc | |
- name: Compile tests | |
run: | | |
npm install | |
npm --prefix test/automation install | |
npm --prefix test/e2e install | |
npm --prefix test/automation run compile | |
npm --prefix test/e2e run compile | |
- name: Get & install latest release | |
id: get_latest_release | |
run: | | |
response=$(curl -s -H "Authorization: token ${{ secrets.POSITRON_GITHUB_PAT }}" "https://api.github.com/repos/posit-dev/positron-builds/releases") | |
latest_tag=$(echo "${response}" | jq -r '.[0].tag_name') | |
asset_url=$(echo "${response}" | jq -r '.[0].assets[] | select(.name|match("deb")) | .url') | |
filename=$(echo "${response}" | jq -r '.[0].assets[] | select(.name|match("deb")) | .name') | |
echo "Latest release: ${latest_tag}" | |
echo "Downloading ${filename} from ${asset_url}..." | |
curl -L -H "Accept: application/octet-stream" -H "Authorization: token ${{ secrets.POSITRON_GITHUB_PAT }}" "${asset_url}" -o "${filename}" | |
sudo dpkg -i "${filename}" | |
- name: Setup E2E Test Environment | |
uses: ./.github/actions/setup-test-env | |
with: | |
aws-role-to-assume: ${{ secrets.QA_AWS_RO_ROLE }} | |
aws-region: ${{ secrets.QA_AWS_REGION }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Configure xvfb Service | |
shell: bash | |
run: | | |
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 | |
- name: Send Results to GH Summary | |
uses: ./.github/actions/gen-report-dir | |
if: ${{ !cancelled() }} | |
- name: Transform to Playwright Tags $PW_TAGS | |
run: bash scripts/pr-tags-transform.sh "e2e-electron" "${{ inputs.grep }}" | |
shell: bash | |
- name: Run Tests (Electron) | |
if: ${{ !cancelled() }} | |
env: | |
POSITRON_PY_VER_SEL: 3.10.12 | |
POSITRON_R_VER_SEL: 4.4.0 | |
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }} | |
CURRENTS_CI_BUILD_ID: ${{ github.run_id }}-${{ github.run_attempt }} | |
COMMIT_INFO_MESSAGE: ${{ github.event.head_commit.message }} | |
PWTEST_BLOB_DO_NOT_REMOVE: 1 | |
CURRENTS_TAG: "release,electron/linux" | |
id: electron-e2e-tests | |
run: | | |
export DISPLAY=:10 | |
BUILD=/usr/share/positron npx playwright test --project e2e-electron --workers 2 --grep=${{ env.PW_TAGS }} | |
- name: Upload Playwright Report to S3 | |
if: ${{ !cancelled() }} | |
uses: ./.github/actions/upload-report-to-s3 | |
with: | |
role-to-assume: ${{ secrets.AWS_TEST_REPORTS_ROLE }} | |
report-dir: ${{ env.REPORT_DIR }} | |
slack-notify: | |
needs: [e2e-electron] | |
runs-on: ubuntu-latest | |
if: always() | |
steps: | |
- name: Notify Slack | |
uses: midleman/slack-workflow-status@master | |
with: | |
repo_token: ${{ secrets.POSITRON_GITHUB_PAT }} | |
slack_webhook_url: ${{ secrets.SLACK_TEST_RESULTS_WEBHOOK_URL }} | |
notify_on: ${{ inputs.notify_on }} |