Fix comm open messages also firing as display data messages (#5464) #31
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: "Positron: CI - Merge to main" | |
on: | |
push: | |
branches: | |
- main | |
- 'prerelease/**' | |
workflow_call: | |
inputs: | |
e2e_grep: | |
required: false | |
description: "Grep filter to apply to the e2e tests: @pr, @win, etc." | |
default: "" | |
type: string | |
workflow_dispatch: | |
inputs: | |
e2e_grep: | |
required: false | |
description: "Grep filter to apply to the e2e tests: @pr, @win, etc." | |
default: "" | |
type: string | |
env: | |
E2E_GREP: ${{ inputs.e2e_grep || '' }} | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
e2e-electron: | |
timeout-minutes: 45 | |
runs-on: ubuntu-latest-8x | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
POSITRON_BUILD_NUMBER: 0 # CI skips building releases | |
_R_CHECK_FUTURE_FILE_TIMESTAMPS_: false # this check can be flaky in the R pkg tests | |
_R_CHECK_CRAN_INCOMING_: false | |
_R_CHECK_SYSTEM_CLOCK_: false | |
AWS_S3_BUCKET: positron-test-reports | |
REPORT_DIR: playwright-report-${{ github.run_id }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Cache node_modules, build, extensions, and remote | |
uses: ./.github/actions/cache-multi-paths | |
- name: Setup Build and Compile | |
uses: ./.github/actions/setup-build-env | |
- 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: Send HTML report URL to GitHub Summary | |
if: ${{ !cancelled() }} | |
run: | | |
REPORT_URL="https://d38p2avprg8il3.cloudfront.net/${{ env.REPORT_DIR }}/index.html" | |
echo "Report URL: $REPORT_URL" | |
echo "📄 [Playwright Report]($REPORT_URL) <br>" > $GITHUB_STEP_SUMMARY | |
- name: Run Playwright Tests (Electron) | |
env: | |
POSITRON_PY_VER_SEL: 3.10.12 | |
POSITRON_R_VER_SEL: 4.4.0 | |
id: e2e-playwright-tests | |
run: DISPLAY=:10 npx playwright test --project e2e-electron --workers 2 --grep="${{ env.E2E_GREP }}" | |
- name: Upload Playwright Report to S3 | |
if: ${{ success() || failure() }} | |
uses: ./.github/actions/upload-report-to-s3 | |
with: | |
role-to-assume: ${{ secrets.AWS_TEST_REPORTS_ROLE }} | |
unit-integration: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
POSITRON_BUILD_NUMBER: 0 # CI skips building releases | |
_R_CHECK_FUTURE_FILE_TIMESTAMPS_: false # this check can be flaky in the R pkg tests | |
_R_CHECK_CRAN_INCOMING_: false | |
_R_CHECK_SYSTEM_CLOCK_: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Cache node_modules, build, extensions, and remote | |
uses: ./.github/actions/cache-multi-paths | |
- name: Setup Build and Compile | |
uses: ./.github/actions/setup-build-env | |
- name: Install Positron License | |
uses: ./.github/actions/install-license | |
with: | |
github-token: ${{ secrets.POSITRON_GITHUB_PAT }} | |
license-key: ${{ secrets.POSITRON_DEV_LICENSE }} | |
# one unit test needs this: Can list tables and fields from R connections | |
- name: Setup R | |
uses: ./.github/actions/install-r | |
with: | |
version: "4.4.0" | |
- name: Compile Integration Tests | |
run: yarn --cwd test/integration/browser compile | |
- name: Run Unit Tests (node.js) | |
id: nodejs-unit-tests | |
run: yarn test-node | |
- name: Run Integration Tests (Electron) | |
id: electron-integration-tests | |
run: DISPLAY=:10 ./scripts/test-integration-pr.sh | |
slack-notification: | |
name: "Send Slack notification" | |
runs-on: ubuntu-latest | |
needs: [unit-integration, e2e-electron] | |
if: ${{ failure() && inputs.e2e_grep == '' }} | |
steps: | |
- name: "Send Slack notification" | |
uses: testlabauto/[email protected] | |
with: | |
github_token: ${{ secrets.POSITRON_GITHUB_PAT }} | |
slack_token: ${{ secrets.SMOKE_TESTS_SLACK_TOKEN }} | |
slack_channel: C07FR1JNZNJ #positron-test-results channel | |
suite_name: Positron Merge to Main Test Suite |