-
Notifications
You must be signed in to change notification settings - Fork 177
Initial UI tests #4794
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
Merged
+7,038
−262
Merged
Initial UI tests #4794
Changes from 40 commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
222fa66
Initial UI tests jc wk (#11)
JC-wk 4c48dc7
bump ui version
894d744
update changelog
7be1886
create ui tests workflow
eb5925b
Copy config.source.json to config.json
71b0fe5
update retention
61e3e2e
Merge branch 'main' into ui-tests
JC-wk 228c02f
update version
f6456b3
Merge branch 'ui-tests' of https://github.com/JC-wk/AzureTRE into ui-…
340611e
update yarn.lock
f999927
remove frozen lockfile
aff37d5
fix yarn install
01a949c
publish test results
a398404
add UI tests to PR Bot reports
b71d922
add ui tests to pr bot
a27c2f6
fix lint errors and migrate eslint to @nabla/vite-plugin-eslint
80c3d71
revert eslint, combine tests
5406266
update ui test
f7981aa
support download of multiple artifacts
b75f990
publish results after test has finished
302f824
rename
9506884
rename
c5e5032
wait for all tests before publishing results
98ab6dc
add ---
4b49973
test results update
d007ff6
fix repo path
4ab7061
rename artifact
0fd76d6
remove retention
12484ab
rename coverage report and publish result
d0743e8
revert test_results.yaml
cc94f90
update ui_tests
29ce372
fix test report
7e01ed6
update coverage report
69820b1
move test reports to results file
a1bf1f7
fix file path
05e312e
update costsTag and associated tests
044ea0f
Merge branch 'main' into ui-tests
JC-wk 9ea81dc
Disable scheduled cron job in clean_validation_envs.yml
JC-wk d7f7a41
Merge branch 'microsoft:main' into main
JC-wk 1b1aa38
Enable scheduled cleaning of validation environments
JC-wk b739cb7
Merge branch 'microsoft:main' into main
JC-wk 1d5431c
Merge branch 'main' into ui-tests
JC-wk 3ee7115
Merge branch 'main' into ui-tests
JC-wk 3770544
Supply Workspace client secret without having to pass it in the API
marrobi 8d3c02e
remove unused imports
6d03530
Merge branch 'main' into ui-tests
JC-wk 8507e6e
update testing-library packages
3434019
update docs to use yarn
6de5f1c
Merge branch 'microsoft:main' into main
JC-wk c6c480e
delete package lock
cbdae6d
update version and changelog
fc1e2e1
add package-lock.json to .gitignore to prevent future commits
ae906a3
copilot instructions
daee76b
Merge branch 'main' into delete-package-lock
JC-wk 45f3f87
Merge branch 'main' into delete-package-lock
marrobi 8d680b4
Merge branch 'main' into ui-tests
JC-wk 038c561
fix linting issues
b6a8a9f
update tests
206e06c
switch from unsupported vite-plugin-eslint to vite-plugin-checker
e9f28ac
update eslint
c2aaf0d
Merge remote-tracking branch 'origin/delete-package-lock' into ui-tests
710fb3c
Add ESLint config file paths for validation
JC-wk a16fc27
Merge remote-tracking branch 'TREfork/main' into ui-tests
fa81f85
update makefile and pipeline for correct linting of TSX files
85a39ab
Merge branch 'main' into ui-tests
JC-wk c1258c9
add ui-testing to docs menu
43b5b02
Merge branch 'microsoft:main' into main
JC-wk 3ce86ed
update node min version
8ea402b
Merge remote-tracking branch 'TREfork/main' into ui-tests
76ad942
update ui version
0b1582e
add test:ui command
455e4ff
Merge branch 'main' into ui-tests
marrobi 665a4b3
test workflow update
33545e0
Merge branch 'ui-tests' of https://github.com/JC-wk/AzureTRE into ui-…
7797c26
fix linter error
2a9436b
Merge branch 'main' into ui-tests
JC-wk 9456dba
Merge branch 'main' into ui-tests
JC-wk 64d11d9
remove coverage report
91af3fb
remove coverage test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,92 @@ | ||
| --- | ||
| # This workflow is required to publish test results from forks | ||
| name: UI Test Results | ||
|
|
||
| on: # yamllint disable-line rule:truthy | ||
| workflow_run: | ||
| workflows: ["UI Tests"] | ||
| types: | ||
| - completed | ||
| # actionlint doesn't like the following line depite it being recommanded: | ||
| # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs#overview | ||
| # permissions: {} | ||
|
|
||
| jobs: | ||
| ui-test-results: | ||
| name: UI Test Results | ||
| runs-on: ubuntu-latest | ||
| if: github.event.workflow_run.conclusion != 'skipped' | ||
|
|
||
| permissions: | ||
| checks: write | ||
|
|
||
| # needed unless run with comment_mode: off | ||
| pull-requests: write | ||
|
|
||
| # required by download step to access artifacts API | ||
| actions: read | ||
|
|
||
| steps: | ||
| - name: Download and Extract Artifacts | ||
| env: | ||
| GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
| run: | | ||
| mkdir -p artifacts && cd artifacts | ||
|
|
||
| artifacts_url=${{ github.event.workflow_run.artifacts_url }} | ||
|
|
||
| gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read -r artifact | ||
| do | ||
| IFS=$'\t' read -r name url <<< "$artifact" | ||
| gh api "$url" > "$name.zip" | ||
| unzip -d "$name" "$name.zip" | ||
| done | ||
|
|
||
| - name: Publish Test Results | ||
| uses: EnricoMi/publish-unit-test-result-action@v2 | ||
| with: | ||
| commit: ${{ github.event.workflow_run.head_sha }} | ||
| event_file: artifacts/UI Tests Event File/event.json | ||
| event_name: ${{ github.event.workflow_run.event }} | ||
| files: "artifacts/**/*.xml" | ||
| check_name: "UI Test Results" | ||
|
|
||
| # # The following step is the catch situations where the tests didn't run at all. | ||
| # - name: Check failure files | ||
| # run: | | ||
| # if compgen -G "artifacts/**/pytest*failed" > /dev/null; then | ||
| # echo "Tests failure file(s) exist. Some tests have failed or didn't run at all! \ | ||
| # Check the artifacts for details." | ||
| # exit 1 | ||
| # fi | ||
|
|
||
| # For PR builds triggered from comment builds, the GITHUB_REF is set to main | ||
| # so the checks aren't automatically associated with the PR | ||
| # If prHeadSha is specified then explicity mark the checks for that SHA | ||
| - name: Report check status | ||
| if: github.event.workflow_run.head_sha != '' | ||
| uses: LouisBrunner/checks-action@v2.0.0 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| # the name must be identical to the one received by the real job | ||
| sha: ${{ github.event.workflow_run.head_sha }} | ||
| name: "Test Results" | ||
| status: "completed" | ||
| conclusion: ${{ github.event.workflow_run.conclusion }} | ||
| details_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
|
|
||
| ## Vitest Coverage Report | ||
| ## Check out the repository to obtain the vitest.config file | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Download UI Test coverage report | ||
| uses: actions/download-artifact@v6 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| run-id: ${{ github.event.workflow_run.id }} | ||
|
|
||
| - name: Report coverage comparison | ||
| uses: davelosert/vitest-coverage-report-action@v2 | ||
| with: | ||
| working-directory: ui/app/ |
This file contains hidden or 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,75 @@ | ||
| --- | ||
| name: UI Tests | ||
|
|
||
| on: # yamllint disable-line rule:truthy | ||
| pull_request: | ||
| branches: [main] | ||
| paths: | ||
| - "ui/app/**" | ||
| - ".github/workflows/ui_tests.yml" | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "ui/app/**" | ||
|
|
||
| # for each ref (branch/pr) run just the most recent, | ||
| # cancel other pending/running ones | ||
| concurrency: | ||
| group: "${{ github.workflow }}-${{ github.head_ref }}" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| vitest: | ||
| name: Run vitest | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| checks: write | ||
| pull-requests: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "24" | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: ui/app | ||
| run: yarn install | ||
|
|
||
| - name: Copy config.source.json to config.json | ||
| working-directory: ui/app/src | ||
| run: cp config.source.json config.json | ||
|
|
||
| - name: Run vitest | ||
| working-directory: ui/app | ||
| run: yarn test:coverage --run --reporter=junit --outputFile=junit.xml | ||
|
|
||
| - name: Upload coverage report | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: ui-test-coverage-report | ||
| path: ui/app/coverage | ||
| retention-days: 10 | ||
|
|
||
| - name: Upload test results | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: ui-test-results | ||
| path: ui/app/junit.xml | ||
| retention-days: 10 | ||
|
|
||
| # this step is required to publish test results from forks | ||
| - name: Upload Event File | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: UI Tests Event File | ||
| path: ${{ github.event_path }} | ||
| retention-days: 10 |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.