Positron: Windows Full Test Suite #188
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: Windows 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: | |
e2e-windows-tests: | |
runs-on: | |
labels: [windows-latest-8x] | |
timeout-minutes: 60 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
POSITRON_BUILD_NUMBER: 0 # CI skips building releases | |
AWS_S3_BUCKET: positron-test-reports | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
- name: Install System Level Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10.10" | |
- name: Cache node_modules, build, extensions, and remote | |
uses: ./.github/actions/cache-multi-paths | |
- name: Install node dependencies with yarn | |
env: | |
npm_config_arch: x64 | |
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | |
ELECTRON_SKIP_BINARY_DOWNLOAD: 1 | |
POSITRON_GITHUB_PAT: ${{ github.token }} | |
shell: pwsh | |
# nvm on windows does not see .nvmrc | |
# | |
# the installation of the npm package windows-process-tree is known to fail | |
# intermittently in the Github Actions build environment, so we retry | |
# this step a few times if necessary. | |
# | |
# see https://github.com/posit-dev/positron/issues/3481 | |
run: | | |
corepack enable | |
.\scripts\run-with-retry.ps1 -maxAttempts 3 -command "yarn --network-timeout 120000" | |
yarn --cwd test/automation install --frozen-lockfile | |
yarn --cwd test/smoke install --frozen-lockfile | |
- 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 Smoke Tests | |
run: | | |
yarn --cwd test/automation compile | |
yarn --cwd test/smoke compile | |
- name: Install python dependencies | |
run: | | |
curl https://raw.githubusercontent.com/posit-dev/qa-example-content/main/requirements.txt --output requirements.txt | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
python -m pip install ipykernel trcli | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: "4.4.0" | |
- name: Install R packages | |
run: | | |
curl https://raw.githubusercontent.com/posit-dev/qa-example-content/main/DESCRIPTION --output DESCRIPTION | |
Rscript -e "install.packages('pak')" | |
Rscript -e "pak::local_install_dev_deps(ask = FALSE)" | |
- name: Setup Graphviz | |
uses: ts-graphviz/[email protected] | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tinytex: true | |
- name: Setup AWS S3 Access | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.QA_AWS_RO_ROLE }} | |
aws-region: ${{ secrets.QA_AWS_REGION }} | |
- name: Run Tests on Windows (Electron) | |
env: | |
POSITRON_PY_VER_SEL: 3.10.10 | |
POSITRON_R_VER_SEL: 4.4.0 | |
if: ${{ !cancelled() }} | |
id: e2e-win-electron-tests | |
run: npx playwright test --project e2e-electron --grep "@win" --workers 1 | |
- 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-report: | |
if: always() | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.48.0-jammy | |
needs: e2e-windows-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 (Windows)" | |
testrail-api-key: ${{ secrets.TESTRAIL_API_KEY }} | |
testrail-title: "E2E Windows Test Run" | |
github-token: ${{ secrets.POSITRON_GITHUB_PAT }} |