-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run all smoke tests on merge to main (#4141)
This pull request changes the testing flow of smoke tests run with PRs and merges to main. Previously, the same github action was run on pull request and on merge to main. That action would run some unit, some integration, and some smoke tests (tagged with #pr). Now, instead of running the same action on PR and on merge, the on-merge action has been updated to run all smoke tests on merge to main (not just the ones tagged with #pr). The smoke tests are broken up in this fashion because they are time consuming. The idea is to keep the PR set of tests under 7 minutes. If the merge-to-main tests fail, the PR author will be notified via email by github as long as they have their notification settings properly configured (https://github.com/settings/notifications): <img width="1089" alt="image" src="https://github.com/user-attachments/assets/7e889ce4-6813-4499-a946-40dc3cfac34d"> ### QA Notes All smoke tests should pass.
- Loading branch information
1 parent
fc84243
commit 8c256f4
Showing
5 changed files
with
101 additions
and
10 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: "Positron: CI - merge to main" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
linux: | ||
name: Tests on Linux | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 45 | ||
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 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 libcairo-dev libsdl-pango-dev libjpeg-dev libgif-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: 20 | ||
|
||
- name: Execute yarn | ||
env: | ||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1 | ||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1 | ||
POSITRON_GITHUB_PAT: ${{ github.token }} | ||
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 | ||
yarn --cwd test/automation install | ||
yarn --cwd test/smoke install | ||
- 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/smoke compile | ||
|
||
- name: Install rig, R, and R packages | ||
run: | | ||
curl -Ls https://github.com/r-lib/rig/releases/download/latest/rig-linux-"$(arch)"-latest.tar.gz | $(which sudo) tar xz -C /usr/local | ||
rig add 4.4.0 | ||
curl https://raw.githubusercontent.com/posit-dev/qa-example-content/main/DESCRIPTION --output DESCRIPTION | ||
Rscript -e "pak::local_install_dev_deps(ask = FALSE)" | ||
- name: Setup Graphviz | ||
uses: ts-graphviz/[email protected] | ||
|
||
- 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 matplotlib ipykernel graphviz | ||
- name: Run Smoke Tests (Electron) | ||
env: | ||
POSITRON_PY_VER_SEL: 3.10.12 | ||
POSITRON_R_VER_SEL: 4.4.0 | ||
id: electron-smoke-tests | ||
run: DISPLAY=:10 yarn smoketest-merge-to-main --tracing | ||
|
||
- name: Upload run artifacts | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: run-artifacts | ||
path: .build/logs/smoke-tests-electron/ |
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
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
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