-
Notifications
You must be signed in to change notification settings - Fork 7
[Siteplan] e2e testing #2126
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
Open
mariusheine
wants to merge
19
commits into
main
Choose a base branch
from
siteplan-e2e-testing
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[Siteplan] e2e testing #2126
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
f3e237e
add loading and screenshot testing of pphn
mariusheine ca4352e
fix flakiness in e2e test due to multiple loading of svg catalog and …
mariusheine 1a37bdc
add siteplan e2e test to quality workflow
mariusheine 0b16f0c
remove retries in pipeline
mariusheine 2fe0d28
increase timeout due to slower pipeline runner
mariusheine 74af149
improve quality workflow
mariusheine e1a6fb4
add total view test
mariusheine 0a3e29a
blur control buttons on click
mariusheine daba50c
keep video and traces locally
mariusheine 75f5118
try to use UTF-8 character directly
mariusheine b4d076b
more stable initial loading of app
mariusheine 0f73f9c
revert unnecessary change
mariusheine 683c37a
do more consistent transforming
mariusheine 9f9d600
mask control buttons that are different in github ci
mariusheine 45545d6
Merge remote-tracking branch 'origin/main' into siteplan-e2e-testing
mariusheine faeeab1
Merge remote-tracking branch 'origin/main' into siteplan-e2e-testing
mariusheine 7895c37
move test in own workflow
mariusheine 6c9b87a
use production build of lageplan in CI
mariusheine 33fcd65
run test on all branches
mariusheine 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,148 @@ | ||
| # This workflow will build the main SET application and publish it to GitHub Packages | ||
| name: Test SET | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: ["Build SET"] | ||
| types: [completed] | ||
| branches: | ||
| - '*' | ||
|
|
||
| jobs: | ||
| swtbot: | ||
| runs-on: windows-latest | ||
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
| permissions: | ||
| contents: write | ||
| checks: write | ||
| pull-requests: write | ||
| actions: read | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Java | ||
| uses: eclipse-set/build/.github/actions/setup-java@main | ||
|
|
||
| - name: Fetch SET | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| name: eclipse-set-snapshot-${{github.run_number}} | ||
| path: ${{ env.TEST_APPLICATION_DIR }} | ||
|
|
||
| - name: Fetch m2 Deploy | ||
| # For main or tag build, the m2 packages can be taken directly from github m2package | ||
| if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| name: set-m2deploy-${{github.run_number}} | ||
| path: ${{ env.DEPLOY_DIR }} | ||
|
|
||
| - name: Fetch main csv files | ||
| if: github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/release/') && !startsWith(github.ref, 'refs/tags/') | ||
| uses: eclipse-set/build/.github/actions/fetch-main-table-csv-ref@main | ||
| with: | ||
| repo: ${{ github.repository }} | ||
| continue-on-error: true | ||
|
|
||
| - name: Cache m2repo | ||
| uses: actions/cache@v5 | ||
| with: | ||
| enableCrossOsArchive: true | ||
| path: ~/.m2/repository | ||
| key: ${{ runner.os }}-m2repo-${{ hashFiles('**/java/bundles/org.eclipse.set.releng.target/org.eclipse.set.releng.target.target', 'pom.xml') }} | ||
| restore-keys: ${{ runner.os }}-m2repo- | ||
|
|
||
| - name: Run Test | ||
| id: test-steps | ||
| shell: bash | ||
| run: | | ||
| m2RepoPath="https://maven.pkg.github.com/eclipse-set/set" | ||
| if [[ "${{ github.event_name }}" == "pull_request" || "${{github.ref}}" == refs/heads/release/* ]]; then | ||
| m2RepoPath="file://${{ env.DEPLOY_DIR }}" | ||
| fi | ||
| mvn -T 1.5C -U -B -f java-test/pom.xml clean verify \ | ||
| --settings ./.github/settings.xml \ | ||
| -Dskip-test=false \ | ||
| -Dm2-repo-path="$m2RepoPath" \ | ||
| -Dapplication-under-test="${{ env.TEST_APPLICATION_DIR }}" \ | ||
|
|
||
| - name: Upload csv files | ||
| if: failure() && steps.test-steps.outcome == 'failure' | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: table-csv-${{github.run_number}} | ||
| path: ${{ github.workspace}}/java/bundles/org.eclipse.set.swtbot/target/classes/diff/**/*.csv | ||
| retention-days: 7 | ||
|
|
||
| table-diff-view: | ||
| runs-on: ubuntu-latest | ||
| needs: swtbot | ||
| if: always() && github.actor_id != 49699333 && !startsWith(github.ref, 'refs/heads/release/') && !startsWith(github.ref, 'refs/tags/') | ||
| container: ghcr.io/eclipse-set/table-diff-view:latest | ||
| permissions: | ||
| contents: write | ||
| checks: write | ||
| pull-requests: write | ||
| actions: read | ||
| issues: write | ||
| steps: | ||
| - name: Get Branchname | ||
| shell: bash | ||
| run: | | ||
| if [ "${{ github.event_name }}" == "pull_request" ]; then | ||
| echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV | ||
| else | ||
| echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | ||
| fi | ||
|
|
||
| - name: Fetch table csv | ||
| if: needs.swtbot.result == 'failure' | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| name: table-csv-${{github.run_number}} | ||
| path: ${{ env.DIFF_DIR }} | ||
|
|
||
| - name: Create diff view | ||
| shell: bash | ||
| run: | | ||
| python -m tablediffview \ | ||
| --diffDir=${{ env.DIFF_DIR }} \ | ||
| --branchName=${{ env.BRANCH_NAME }} \ | ||
| --prNumber=${{github.event.pull_request.number}} \ | ||
| --runId=${{github.run_id}} | ||
|
|
||
| - name: Upload Diff-File | ||
| if: needs.swtbot.result == 'failure' | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: table-diff-files-${{github.run_number}} | ||
| path: ${{ env.DIFF_DIR }}/diff-md | ||
| retention-days: 5 | ||
|
|
||
| test-siteplan: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 20 | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
| working-directory: web/siteplan | ||
|
|
||
| - name: Install Playwright Browsers | ||
| run: npm exec playwright install --with-deps | ||
| working-directory: web/siteplan | ||
|
|
||
| - name: Run Playwright tests | ||
| run: npm run test:e2e | ||
| working-directory: web/siteplan | ||
|
|
||
| - uses: actions/upload-artifact@v6 | ||
| if: ${{ !cancelled() }} | ||
| with: | ||
| name: playwright-report | ||
| path: web/siteplan/playwright-report/ | ||
| retention-days: 1 | ||
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mariusheine Did you already test this Workflow on your fork ? I think this workflow should be triggered by "Build SET" workflow. When trigger by "Build SET" completed, then it can't take correct the artifact for test.
Otherweise should this Workflow only execute by main, normal PR and update package.json in siteplan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TruongQuangSB No I have not tested it by now. I wanted to trigger it only on completed because otherwise the SET build was not successful.