Skip to content

Commit

Permalink
[CI] Add step running playwright integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
avinBar committed Jul 26, 2024
1 parent 681c156 commit 23d3d77
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,52 @@ jobs:
exit -1
fi
- name: Playwright integration tests
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'windows-latest')
run: |
./gradlew :vividus-tests:debugStories --project-prop 'vividus.configuration-set.active=playwright-integration' --project-prop 'vividus.allure.history-directory=output/history/integration-tests' --project-prop 'vividus.allure.executor.name="Github Actions (Vividus)"' --project-prop 'vividus.allure.executor.type=github' --project-prop 'vividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions' --project-prop 'vividus.allure.executor.build-order=${GITHUB_RUN_ID}' --project-prop 'vividus.allure.executor.build-name="Playwright Integration Tests ${GITHUB_RUN_ID}"' --project-prop 'vividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID}' --project-prop 'vividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID}' --project-prop 'vividus.allure.executor.report-name="Playwright Integration tests report"' --project-prop "fileToSaveExitCode=$(pwd)/exitCode.txt" --no-daemon
- name: Playwright integration tests
if: matrix.platform == 'macos-latest'
run: |
./gradlew :vividus-tests:debugStories -Pvividus.configuration-set.active=playwright-integration \
-Pvividus.batch-1.resource-exclude-patterns="Precondition*.story,TableTransformers.story,Load ExamplesTable from local file.story,VideoSteps.story" \
-Pvividus.allure.history-directory=output/history/integration-tests \
-Pvividus.allure.executor.name="Github Actions (Vividus)" \
-Pvividus.allure.executor.type=github \
-Pvividus.allure.executor.url=https://github.com/vividus-framework/vividus/actions \
-Pvividus.allure.executor.build-order=${GITHUB_RUN_ID} \
-Pvividus.allure.executor.build-name="Playwright Integration Tests ${GITHUB_RUN_ID}" \
-Pvividus.allure.executor.build-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-url=https://github.com/vividus-framework/vividus/actions/runs/${GITHUB_RUN_ID} \
-Pvividus.allure.executor.report-name="Playwright integration tests report" \
-PfileToSaveExitCode=$(pwd)/exitCode.txt --no-daemon
- name: Publish playwright integration tests report
if: always()
uses: actions/upload-artifact@v4
with:
name: Playwright Integration Tests - Allure report - ${{ matrix.platform }}
path: vividus-tests/output/reports/allure

- name: Validate successful exit code
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'windows-latest')
shell: bash
run: |
exitCode=$(cat ./exitCode.txt)
if [[ $exitCode -ne '1' ]]; then
exit $exitCode
fi
- name: Validate failed exit code
if: (matrix.platform == 'ubuntu-latest' || matrix.platform == 'windows-latest') && failure()
shell: bash
run: |
exitCode=$(cat ./exitCode.txt)
if [[ $exitCode -ne '2' ]]; then
echo Exit code is $exitCode
exit -1
fi
- name: System tests
if: matrix.platform == 'ubuntu-latest'
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ configuration-set.integration.profiles=web/headless/chrome
configuration-set.integration.suites=#{true ? "integration,additional,ui" : "This is not the suites you're looking for"}
configuration-set.integration.environments=integration

# Playwright Integration tests
configuration-set.playwright-integration.profiles=web_pw/headless/chromium
configuration-set.playwright-integration.suites=#{true ? "integration/playwright,additional,ui" : "This is not the suites you're looking for"}
configuration-set.playwright-integration.environments=integration

# System tests
configuration-set.system.environments=system/web,system/api
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
batch-1.resource-exclude-patterns=Precondition*.story,TableTransformers.story,Load ExamplesTable from local file.story
batch-1.meta-filters=groovy: !skip && epic == 'vividus-plugin-web-app' && !locale || locale.toString().tokenize(' ').contains('${batch-1.variables.locale}')
batch-2.resource-include-patterns=
batch-3.resource-include-patterns=
batch-4.resource-include-patterns=
batch-5.resource-include-patterns=
batch-6.resource-include-patterns=

0 comments on commit 23d3d77

Please sign in to comment.