Test: Full Suite (Ubuntu) #1152
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: "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: | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
POSITRON_BUILD_NUMBER: 0 # CI skips building releases | |
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: 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 | |
integration-tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
POSITRON_BUILD_NUMBER: 0 # CI skips building releases | |
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 }} | |
- 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 Integration Tests (Electron) | |
id: electron-integration-tests | |
run: DISPLAY=:10 ./scripts/test-integration.sh | |
- name: Run Integration Tests (Remote) | |
if: ${{ job.status != 'cancelled' && (success() || failure()) }} | |
id: electron-remote-integration-tests | |
run: DISPLAY=:10 ./scripts/test-remote-integration.sh | |
- name: Run Integration Tests (Browser, Chromium) | |
if: ${{ job.status != 'cancelled' && (success() || failure()) }} | |
id: browser-integration-tests | |
run: DISPLAY=:10 ./scripts/test-web-integration.sh --browser chromium | |
- name: Clean up license files | |
if: always() | |
run: cd .. && rm -rf positron-license | |
e2e-electron-tests: | |
runs-on: ubuntu-latest-8x | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: false | |
matrix: | |
shardIndex: [1, 2] | |
shardTotal: [2] | |
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: 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: Run Tests (Electron) | |
env: | |
POSITRON_PY_VER_SEL: 3.10.12 | |
POSITRON_R_VER_SEL: 4.4.0 | |
id: electron-tests | |
run: DISPLAY=:10 npx playwright test --project e2e-electron --workers 1 --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | |
- name: Upload blob report | |
if: ${{ !cancelled() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: blob-report-electron-${{ matrix.shardIndex }} | |
path: blob-report | |
retention-days: 14 | |
- name: Upload junit report | |
if: ${{ !cancelled() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: junit-report-electron-${{ matrix.shardIndex }} | |
path: test-results/junit.xml | |
e2e-browser-tests: | |
runs-on: ubuntu-latest-4x | |
timeout-minutes: 50 | |
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 }} | |
- 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: Run Tests (Browser) | |
env: | |
POSITRON_PY_VER_SEL: 3.10.12 | |
POSITRON_R_VER_SEL: 4.4.0 | |
id: browser-tests | |
run: DISPLAY=:10 npx playwright test --project e2e-browser --workers 1 | |
- name: Upload blob report | |
if: ${{ !cancelled() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: blob-report-browser | |
path: blob-report | |
retention-days: 14 | |
- name: Clean up license files | |
if: always() | |
run: cd .. && rm -rf positron-license | |
e2e-report: | |
if: always() | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.48.0-jammy | |
needs: [e2e-electron-tests, e2e-browser-tests, unit-tests, integration-tests] | |
env: | |
REPORT_DIR: playwright-report-${{ github.run_id }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Run E2E Report | |
uses: ./.github/actions/e2e-report | |
with: | |
aws-s3-bucket: positron-test-reports | |
aws-role: ${{ secrets.AWS_TEST_REPORTS_ROLE }} | |
slack-token: ${{ secrets.SMOKE_TESTS_SLACK_TOKEN }} | |
slack-channel: C07FR1JNZNJ | |
slack-title: "Full Test Suite (Electron)" | |
testrail-api-key: ${{ secrets.TESTRAIL_API_KEY }} | |
testrail-title: "E2E Electron Test Run" | |
github-token: ${{ secrets.POSITRON_GITHUB_PAT }} |