Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Mi/pw exp #5234

Draft
wants to merge 263 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
263 commits
Select commit Hold shift + click to select a range
df9a1a7
Merge branch 'main' into mi/pw-exp
midleman Oct 21, 2024
2d4fc69
swap global setup
midleman Oct 21, 2024
e5b4c57
restart
midleman Oct 21, 2024
7430023
restart
midleman Oct 21, 2024
02d8730
fix tracing
midleman Oct 21, 2024
4d5a4da
remove only
midleman Oct 21, 2024
d75ea56
small cleanup
midleman Oct 21, 2024
59f121f
add interpreter
midleman Oct 23, 2024
be034d1
page,context
midleman Oct 23, 2024
06093d6
cleanup
midleman Oct 23, 2024
97cab01
notebook-variables test
midleman Oct 23, 2024
83206b4
restart app
midleman Oct 24, 2024
4504e3f
retry example
midleman Oct 24, 2024
6dbdbd2
cleanup
midleman Oct 24, 2024
ac4a42d
fix notebook test
midleman Oct 24, 2024
cfce8c3
fix notebook pom
midleman Oct 24, 2024
812943f
Merge branch 'main' into mi/pw-exp
midleman Oct 24, 2024
60ad15e
spinner
midleman Oct 24, 2024
2ca8d84
quarto
midleman Oct 24, 2024
f68890c
most tracing works
midleman Oct 25, 2024
2f58fed
merge main
midleman Oct 25, 2024
2bf1236
remove tracing comments
midleman Oct 28, 2024
728e52c
eh
midleman Oct 28, 2024
84a7fd6
basic logging is back
midleman Oct 28, 2024
8eaff5e
yeah still not right
midleman Oct 29, 2024
b190b14
restart worker per spec
midleman Oct 30, 2024
d1ed1ea
add some comments
midleman Oct 30, 2024
a38a986
cleanup tests
midleman Oct 30, 2024
b228929
Merge branch 'main' into mi/pw-exp
midleman Oct 30, 2024
e83d517
improve retry test
midleman Oct 30, 2024
2b0e9f0
test cleanup
midleman Oct 30, 2024
14c397a
tag annot
midleman Oct 30, 2024
15c4f58
attach logs to report
midleman Oct 31, 2024
b24eac3
build
midleman Oct 31, 2024
c767c59
yml
midleman Oct 31, 2024
8d9e761
remove extra yml
midleman Oct 31, 2024
d1b321e
use out
midleman Oct 31, 2024
debdd30
no imports
midleman Oct 31, 2024
b3f0a8e
no imports
midleman Oct 31, 2024
8550d8c
mimic location
midleman Oct 31, 2024
b04b437
ts file
midleman Oct 31, 2024
e119c46
fix legacy
midleman Oct 31, 2024
851fce4
try js
midleman Oct 31, 2024
e6a0b5c
compile
midleman Oct 31, 2024
340bb5c
ssh
midleman Oct 31, 2024
9acf7c7
grr
midleman Oct 31, 2024
472de25
env tweaks
midleman Oct 31, 2024
b1c3910
env var
midleman Oct 31, 2024
1763120
oops
midleman Oct 31, 2024
ca41f59
remove intg comp
midleman Oct 31, 2024
82562b9
pr tests
midleman Oct 31, 2024
d8fa0e0
fix version
midleman Oct 31, 2024
b457770
switch config
midleman Oct 31, 2024
3d4f11e
try imports again
midleman Oct 31, 2024
71b6d73
remove comments
midleman Oct 31, 2024
00c4831
remove license
midleman Oct 31, 2024
19c6d6b
test env
midleman Nov 1, 2024
5adb53d
fix report
midleman Nov 1, 2024
ecbf6dc
remove log
midleman Nov 1, 2024
9d5066f
housekeeping
midleman Nov 1, 2024
4ba5f86
slow test threshold
midleman Nov 1, 2024
b6d34db
add compile?
midleman Nov 1, 2024
cd978f1
swap import
midleman Nov 1, 2024
f8fdaca
open on fail
midleman Nov 1, 2024
1ea3a72
Merge branch 'main' into mi/pw-exp
midleman Nov 1, 2024
ae18b21
add back screens for mocha runs
midleman Nov 1, 2024
a10a3f2
add comments
midleman Nov 1, 2024
d29c3cc
fix comments
midleman Nov 1, 2024
635ed51
data explorer
midleman Nov 1, 2024
a9c528e
add suite ids
midleman Nov 1, 2024
5b05026
more tests
midleman Nov 1, 2024
b553330
update suite ids
midleman Nov 1, 2024
d10dad3
console tests
midleman Nov 1, 2024
4d5c65b
fix timeout
midleman Nov 1, 2024
486ec7f
new project tests
midleman Nov 2, 2024
a40ab9e
couple more
midleman Nov 2, 2024
72f78cf
merge test
midleman Nov 2, 2024
22d9df7
rename tests
midleman Nov 2, 2024
a8d6796
rename
midleman Nov 2, 2024
191cadc
try shard
midleman Nov 2, 2024
16d83b4
Revert "try shard"
midleman Nov 2, 2024
ff78bb7
matrix shard
midleman Nov 2, 2024
5d15c73
Revert "matrix shard"
midleman Nov 2, 2024
ab3b88c
new proj
midleman Nov 2, 2024
99c3e42
8x
midleman Nov 2, 2024
1972a97
python apps
midleman Nov 2, 2024
022e8a8
move tests
midleman Nov 3, 2024
e968885
move tests again
midleman Nov 3, 2024
f584b3c
split wflow
midleman Nov 3, 2024
66f9457
add back plot imgs
midleman Nov 3, 2024
2415768
Merge branch 'main' into mi/pw-exp
midleman Nov 3, 2024
62b79ba
rename
midleman Nov 3, 2024
8163362
cleanup
midleman Nov 4, 2024
e857033
console python
midleman Nov 4, 2024
f7c6013
wflow
midleman Nov 4, 2024
c494b32
unit-intg
midleman Nov 4, 2024
01ceda7
remove setupR?
midleman Nov 4, 2024
2a6f713
r back
midleman Nov 4, 2024
235cbdd
Merge branch 'main' into mi/pw-exp
midleman Nov 4, 2024
90c88e2
fix trace
midleman Nov 4, 2024
bcfd971
fix paths
midleman Nov 5, 2024
147fc3b
remove tag
midleman Nov 5, 2024
66c6dd8
Merge branch 'main' into mi/pw-exp
midleman Nov 6, 2024
26ec828
more tests
midleman Nov 6, 2024
3cf3a8e
even more tests
midleman Nov 6, 2024
f0267aa
remove mocha pr
midleman Nov 6, 2024
377d51b
4 more tests
midleman Nov 6, 2024
2111b58
run all, eek
midleman Nov 6, 2024
40f847a
ugh timeuot
midleman Nov 6, 2024
6eedbb1
4 more tests
midleman Nov 6, 2024
154cc1e
split new proj test
midleman Nov 6, 2024
ce8afd2
oops
midleman Nov 6, 2024
0d155f9
add interp drop down test
midleman Nov 6, 2024
9907671
modify interp logic
midleman Nov 6, 2024
75180ab
update config
midleman Nov 6, 2024
21d9c1d
full and pr
midleman Nov 6, 2024
322490d
update browser tests
midleman Nov 6, 2024
ff17577
compile e2e
midleman Nov 7, 2024
013d20b
disable slack
midleman Nov 7, 2024
076f5af
fix cmp action
midleman Nov 7, 2024
6a1683c
consolidate tests
midleman Nov 7, 2024
9c281b4
some traces
midleman Nov 7, 2024
6def065
Merge branch 'main' into mi/pw-exp
midleman Nov 7, 2024
1dce637
shard
midleman Nov 7, 2024
ec36aef
disable browser
midleman Nov 7, 2024
cc17dce
fix start up
midleman Nov 7, 2024
034257b
fix interp wait
midleman Nov 7, 2024
7bdc897
try blob
midleman Nov 7, 2024
ab0e716
interp test cleanup
midleman Nov 7, 2024
bf712e9
pw install
midleman Nov 7, 2024
303f05d
try unnesting
midleman Nov 7, 2024
b0a6cf2
try on PR
midleman Nov 7, 2024
d31b35c
use .slow()
midleman Nov 7, 2024
2482d2f
add serial mode
midleman Nov 7, 2024
31195fa
plots improvements
midleman Nov 7, 2024
f989558
oops
midleman Nov 7, 2024
9e267b9
another oops
midleman Nov 7, 2024
5244c40
make file go away?
midleman Nov 7, 2024
c510ff4
Merge branch 'main' into mi/pw-exp
midleman Nov 7, 2024
145a257
lg pyth nb
midleman Nov 7, 2024
446564d
fix term tab
midleman Nov 7, 2024
6c17213
split new proj test
midleman Nov 7, 2024
cee6aeb
split 100x100
midleman Nov 7, 2024
4269d4d
trace condition
midleman Nov 7, 2024
c8e8c35
fix new proj test
midleman Nov 7, 2024
cebce74
remove examples
midleman Nov 7, 2024
6ceb3b7
see if not attaching all traces is problem
midleman Nov 7, 2024
ded5f21
try v3
midleman Nov 7, 2024
08fbfb3
tag PR - temp
midleman Nov 7, 2024
ab36278
blob report path
midleman Nov 7, 2024
722f2e8
tag marie
midleman Nov 7, 2024
fd65aac
remove tag
midleman Nov 8, 2024
2e0a5cd
fix blob path
midleman Nov 8, 2024
210e01e
this dang test
midleman Nov 8, 2024
20e528d
is this the problem
midleman Nov 8, 2024
0d422c7
fine whatever
midleman Nov 8, 2024
b651b5e
remove temp tag
midleman Nov 8, 2024
e6fbd47
enable TR again
midleman Nov 8, 2024
1e0342c
fix yml
midleman Nov 8, 2024
bd5cfde
try v4 again
midleman Nov 8, 2024
1a4f538
bump job timeout
midleman Nov 8, 2024
93967bc
modify pr reporting
midleman Nov 8, 2024
4cd20b7
nit report path
midleman Nov 8, 2024
764840b
merged junit report
midleman Nov 8, 2024
cc72791
matrix browser
midleman Nov 8, 2024
8f8fd72
Fix merge cmd
midleman Nov 8, 2024
98d47f6
missing shard
midleman Nov 8, 2024
bc18de4
electron junit only
midleman Nov 8, 2024
c121e59
try list
midleman Nov 8, 2024
b2c9634
try diff reporter
midleman Nov 8, 2024
85fd3f4
Merge branch 'main' into mi/pw-exp
midleman Nov 8, 2024
8cbcbe1
move dep
midleman Nov 8, 2024
e74cfa2
no skipped
midleman Nov 8, 2024
2dde218
blank title
midleman Nov 8, 2024
99ec73d
1 matrix
midleman Nov 8, 2024
68f1598
add test
midleman Nov 8, 2024
af75a5c
fix test
midleman Nov 8, 2024
ed9a6c1
line
midleman Nov 8, 2024
e361209
skip
midleman Nov 9, 2024
6fd7e1d
dot report
midleman Nov 9, 2024
ff5c79c
switch pkg
midleman Nov 9, 2024
4216fa3
bump
midleman Nov 9, 2024
6ab7b7c
bump again
midleman Nov 9, 2024
03a1b7e
remove step
midleman Nov 9, 2024
1829d17
timeout
midleman Nov 9, 2024
b3a8c28
junit-to-md
midleman Nov 9, 2024
527092a
gh summary on full suite
midleman Nov 10, 2024
7aa6719
install xml2js
midleman Nov 10, 2024
4589230
xml2js install
midleman Nov 10, 2024
beaa2fd
back 2 reporter
midleman Nov 10, 2024
bc5b66f
don't upload all test-results
midleman Nov 10, 2024
b9c9e54
skip
midleman Nov 10, 2024
bcb58bb
test tweak
midleman Nov 11, 2024
2b6b72d
interp wait
midleman Nov 11, 2024
46472ee
new proj beforeEach
midleman Nov 11, 2024
cb980e9
missing await
midleman Nov 11, 2024
90ac1cf
fix test
midleman Nov 11, 2024
5794119
adjust timeout
midleman Nov 11, 2024
02eba12
notebooks select interpreter fix
midleman Nov 11, 2024
f920327
tweaks
midleman Nov 11, 2024
e807dd6
notebook select interpreter
midleman Nov 11, 2024
8574c2f
more shards?
midleman Nov 11, 2024
4b3b08f
remove expect
midleman Nov 11, 2024
3a6bbe4
bye felicia
midleman Nov 12, 2024
049df81
startup regex
midleman Nov 12, 2024
26e189d
switch to count
midleman Nov 12, 2024
6bf5d63
more fixes
midleman Nov 12, 2024
ff53272
add starting
midleman Nov 12, 2024
6348605
shard experiment
midleman Nov 12, 2024
34146cf
just 1 shard?
midleman Nov 12, 2024
2cfdcfe
edit shard again
midleman Nov 12, 2024
5319537
python
midleman Nov 12, 2024
20a480f
fix active console locator
midleman Nov 12, 2024
40affa4
skips with links to issues
midleman Nov 12, 2024
f64c437
update windows wflow
midleman Nov 12, 2024
bc3bc54
try playwright container
midleman Nov 12, 2024
022d4d9
add annotations
midleman Nov 12, 2024
e4c8c7d
Revert "try playwright container"
midleman Nov 12, 2024
7436066
update console output log test
midleman Nov 12, 2024
34e1e1a
update windows cmd
midleman Nov 12, 2024
4185a3e
fix annotations
midleman Nov 12, 2024
6a3e8d2
fix annotations... again
midleman Nov 12, 2024
1aaa961
increase retention
midleman Nov 12, 2024
abc0406
update workflow for grep
midleman Nov 12, 2024
80acf58
fix logs
midleman Nov 12, 2024
38b8158
clean up test setup
midleman Nov 12, 2024
3e990d9
quotes?
midleman Nov 12, 2024
4e36b83
was this it?
midleman Nov 12, 2024
e31653f
consolidate slack notification
midleman Nov 12, 2024
4882618
bump console wait
midleman Nov 13, 2024
899af94
workflow updates
midleman Nov 13, 2024
d82af09
more workflow cleanup
midleman Nov 13, 2024
7d850e1
remove log upload
midleman Nov 13, 2024
2020028
update shiny tag
midleman Nov 13, 2024
b32e8df
nit
midleman Nov 13, 2024
c10d213
add that back in
midleman Nov 13, 2024
2ae2b53
Merge branch 'main' into mi/pw-exp
midleman Nov 13, 2024
828a927
try upload
midleman Nov 13, 2024
bd0c85f
region
midleman Nov 13, 2024
8289f45
try prepend again
midleman Nov 13, 2024
4fe1e37
Merge branch 'main' into mi/pw-exp
midleman Nov 13, 2024
a704f25
try to overwrite
midleman Nov 13, 2024
25cc5a6
moved report link
midleman Nov 13, 2024
a54c723
improve link
midleman Nov 13, 2024
19ea061
update fastapi tag
midleman Nov 13, 2024
14c199a
update report link
midleman Nov 13, 2024
116d8f6
update windows workflow with gh summary
midleman Nov 13, 2024
65d5674
remove html artifact
midleman Nov 13, 2024
c70ac69
prevent corrupted zips
midleman Nov 13, 2024
b49016c
add report emoji
midleman Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actions/setup-test-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ runs:
uses: ./.github/actions/install-r
with:
version: "4.4.0"

- name: Compile E2E Tests
shell: bash
run: yarn --cwd test/automation compile && yarn --cwd test/smoke compile
125 changes: 70 additions & 55 deletions .github/workflows/positron-full-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ jobs:

e2e-electron-tests:
runs-on: ubuntu-latest-8x
timeout-minutes: 80
timeout-minutes: 50
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2]
shardTotal: [2]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
POSITRON_BUILD_NUMBER: 0 # CI skips building releases
Expand Down Expand Up @@ -126,45 +131,30 @@ jobs:
env:
POSITRON_PY_VER_SEL: 3.10.12
POSITRON_R_VER_SEL: 4.4.0
id: electron-smoke-tests
run: DISPLAY=:10 yarn smoketest-all --tracing --skip-cleanup
id: electron-tests
run: DISPLAY=:10 npx playwright test --project e2e-electron --workers 1 --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

- name: Convert XUnit to JUnit
id: xunit-to-junit
if: success() || failure()
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils
yarn xunit-to-junit smoke-tests-electron

- name: Publish Electron Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
- name: Upload blob report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
report_paths: "**/.build/logs/smoke-tests-electron/test-results/xunit-results.xml"
check_name: "Electron Test Results"
token: ${{ secrets.GITHUB_TOKEN }}
name: blob-report-electron-${{ matrix.shardIndex }}
path: blob-report
retention-days: 14

- name: Set TestRail Run Title
id: set-testrail-run-title
if: steps.xunit-to-junit == 'success'
run: echo "TESTRAIL_TITLE=$(date +'%Y-%m-%d') Nightly Smoke Tests - $GITHUB_REF_NAME" >> $GITHUB_ENV
if: ${{ !cancelled() }}
run: echo "TESTRAIL_TITLE=$(date +'%Y-%m-%d') Nightly E2E Electron Tests - $GITHUB_REF_NAME" >> $GITHUB_ENV

- name: Upload Test Results to TestRail (Electron ONLY)
id: testrail-upload
if: steps.xunit-to-junit == 'success'
run: trcli --host "https://posit.testrail.io/" --project Positron --username testrailautomation@posit.co --key ${{ secrets.TESTRAIL_API_KEY}} parse_junit --file ".build/logs/smoke-tests-electron/test-results/xunit-results.xml" --case-matcher name --title "$TESTRAIL_TITLE" --close-run

- name: Upload Artifacts - Electron
if: always()
uses: actions/upload-artifact@v4
with:
name: run-artifacts-electron
path: .build/logs/smoke-tests-electron/
if: ${{ !cancelled() }}
run: pip install trcli && trcli --host "https://posit.testrail.io/" --project Positron --username testrailautomation@posit.co --key ${{ secrets.TESTRAIL_API_KEY}} parse_junit --file "./test-results/junit.xml" --case-matcher name --title "$TESTRAIL_TITLE" --close-run

e2e-browser-tests:
runs-on: ubuntu-latest-4x
timeout-minutes: 40
timeout-minutes: 50
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
POSITRON_BUILD_NUMBER: 0 # CI skips building releases
Expand Down Expand Up @@ -197,42 +187,28 @@ jobs:
aws-region: ${{ secrets.QA_AWS_REGION }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Run Web Smoke Tests
- name: Run Tests (Browser)
env:
POSITRON_PY_VER_SEL: 3.10.12
POSITRON_R_VER_SEL: 4.4.0
id: electron-web-smoke-tests
run: DISPLAY=:10 yarn smoketest-web --tracing
id: browser-tests
run: DISPLAY=:10 npx playwright test --project e2e-browser --workers 1

- name: Convert XUnit to JUnit
id: xunit-to-junit
if: success() || failure()
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils
yarn xunit-to-junit smoke-tests-browser

- name: Publish Web Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: "**/.build/logs/smoke-tests-browser/test-results/xunit-results.xml"
check_name: "Web Test Results"
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Artifacts - Browser
if: always()
- name: Upload blob report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: run-artifacts-browser
path: .build/logs/smoke-tests-browser/
name: blob-report-browser
path: blob-report
retention-days: 14

- name: Clean up license files
if: always()
run: cd .. && rm -rf positron-license

slack-notification:
name: "slack-notification"
e2e-report:
container:
image: mcr.microsoft.com/playwright:v1.48.0-jammy
runs-on: ubuntu-latest
needs:
[
Expand All @@ -241,9 +217,48 @@ jobs:
"e2e-electron-tests",
"e2e-browser-tests",
]
if: failure()
if: ${{ !cancelled() }}
env:
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: Download blob reports
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true

- name: Merge blobs into HTML Report
run: npx playwright merge-reports --reporter html ./all-blob-reports

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_TEST_REPORTS_ROLE }}
aws-region: "us-east-1"

- name: Upload Playwright Report to S3 Bucket
if: ${{ !cancelled() }}
run: aws s3 cp playwright-report/. s3://${{ env.AWS_S3_BUCKET }}/${{ env.REPORT_DIR }} --recursive

- name: Send HTML report URL to GitHub Summary
if: ${{ !cancelled() }}
run: |
REPORT_URL="https://${{ env.AWS_S3_BUCKET }}.s3.us-east-1.amazonaws.com/${{ env.REPORT_DIR }}/index.html"
echo $REPORT_URL > url.txt
echo "Report URL: $REPORT_URL"
echo "📄 [Playwright Report]($REPORT_URL) <br>" > $GITHUB_STEP_SUMMARY

- name: "Send Slack notification"
if: ${{ failure() }}
uses: testlabauto/action-test-results-to-slack@v0.0.6
with:
github_token: ${{ secrets.POSITRON_GITHUB_PAT }}
Expand Down
124 changes: 71 additions & 53 deletions .github/workflows/positron-merge-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,86 @@ on:
- main
workflow_call:
inputs:
smoketest_target:
e2e_grep:
required: false
description: "Smoketest suite to run, e.g. smoketest-all or smoketest-pr"
default: "smoketest-all"
description: "Grep filter to apply to the e2e tests: @pr, @win, etc."
default: ""
type: string
workflow_dispatch:
inputs:
smoketest_target:
e2e_grep:
required: false
description: "Smoketest suite to run, e.g. smoketest-all or smoketest-pr"
default: "smoketest-all"
description: "Grep filter to apply to the e2e tests: @pr, @win, etc."
default: ""
type: string

env:
SMOKETEST_TARGET: ${{ inputs.smoketest_target || 'smoketest-all' }}
E2E_GREP: ${{ inputs.e2e_grep || '' }}
AWS_S3_BUCKET: positron-test-reports
REPORT_DIR: playwright-report-${{ github.run_id }}

permissions:
id-token: write
contents: read

jobs:
linux:
name: Tests on Linux
e2e-electron:
timeout-minutes: 30
runs-on: ubuntu-latest-8x
timeout-minutes: 45
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: Send HTML report URL to GitHub Summary
if: ${{ !cancelled() }}
run: |
REPORT_URL="https://${{ env.AWS_S3_BUCKET }}.s3.us-east-1.amazonaws.com/${{ env.REPORT_DIR }}/index.html"
echo $REPORT_URL > url.txt
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: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_TEST_REPORTS_ROLE }}
aws-region: "us-east-1"

- name: Upload Playwright Report to S3 Bucket
if: ${{ !cancelled() }}
run: aws s3 cp playwright-report/. s3://${{ env.AWS_S3_BUCKET }}/$REPORT_DIR --recursive

unit-integration:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
POSITRON_BUILD_NUMBER: 0 # CI skips building releases
Expand All @@ -56,12 +111,11 @@ jobs:
github-token: ${{ secrets.POSITRON_GITHUB_PAT }}
license-key: ${{ secrets.POSITRON_DEV_LICENSE }}

- name: Setup E2E Test Environment
uses: ./.github/actions/setup-test-env
# one unit test needs this: Can list tables and fields from R connections
- name: Setup R
uses: ./.github/actions/install-r
with:
aws-role-to-assume: ${{ secrets.QA_AWS_RO_ROLE }}
aws-region: ${{ secrets.QA_AWS_REGION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
version: "4.4.0"

- name: Compile Integration Tests
run: yarn --cwd test/integration/browser compile
Expand All @@ -74,47 +128,11 @@ jobs:
id: electron-integration-tests
run: DISPLAY=:10 ./scripts/test-integration-pr.sh

- name: Run Smoke Tests (Electron)
if: success() || failure()
env:
POSITRON_PY_VER_SEL: 3.10.12
POSITRON_R_VER_SEL: 4.4.0
id: electron-smoke-tests
run: DISPLAY=:10 yarn ${{ env.SMOKETEST_TARGET }} --tracing --parallel --jobs 2 --skip-cleanup

- name: Convert XUnit to JUnit
id: xunit-to-junit
if: success() || failure()
run: |
sudo apt-get update
sudo apt-get install -y libxml2-utils
/usr/bin/xmllint --version
yarn xunit-to-junit smoke-tests-electron

- name: Set TestRail Run Title
id: set-testrail-run-title
if: always()
run: echo "TESTRAIL_TITLE=$(date +'%Y-%m-%d') Smoke Tests on branch $GITHUB_REF_NAME" >> $GITHUB_ENV

- name: Upload Test Results to TestRail
id: testrail-upload
if: always()
run: trcli --host "https://posit.testrail.io/" --project Positron --username testrailautomation@posit.co --key ${{ secrets.TESTRAIL_API_KEY}} parse_junit --file ".build/logs/smoke-tests-electron/test-results/results.xml" --case-matcher name --title "$TESTRAIL_TITLE" --close-run

- name: Upload run artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: run-artifacts
path: .build/logs/smoke-tests-electron/
outputs:
target: ${{ env.SMOKETEST_TARGET }}

slack-notification:
name: "Send Slack notification"
runs-on: ubuntu-latest
needs: linux
if: ${{ failure() && needs.linux.outputs.target == 'smoketest-all' }}
needs: [unit-integration, e2e-electron]
if: ${{ failure() && inputs.e2e_grep == '' }}
steps:
- name: "Send Slack notification"
uses: testlabauto/action-test-results-to-slack@v0.0.6
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/positron-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- main

jobs:
positron-ci:
tests:
uses: ./.github/workflows/positron-merge-to-main.yml
secrets: inherit
with:
smoketest_target: smoketest-pr
e2e_grep: "@pr"
Loading