-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add(ci): updates to tests CI to run desktop and mobile (#691)
- Loading branch information
Showing
1 changed file
with
27 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
container: | ||
image: mcr.microsoft.com/playwright:v1.47.2-jammy | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
project: ["desktop-chrome", "mobile-chrome"] | ||
permissions: | ||
checks: write | ||
pull-requests: write | ||
|
@@ -47,28 +51,20 @@ jobs: | |
|
||
- name: Run Playwright tests | ||
working-directory: automated-tests | ||
run: PLAYWRIGHT_JSON_OUTPUT_NAME=report.json npx playwright test -c playwright.ci.config.ts | ||
|
||
- uses: daun/playwright-report-summary@v3 | ||
if: always() | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
report-file: ./automated-tests/playwright-report/report.json | ||
job-summary: false | ||
comment-title: "Automated Test Results" | ||
run: npx playwright test -c playwright.ci.config.ts --project=${{ matrix.project }} | ||
|
||
- uses: actions/[email protected] | ||
if: always() | ||
with: | ||
name: playwright-report | ||
name: playwright-report-${{ matrix.project }} | ||
path: automated-tests/playwright-report/ | ||
retention-days: 5 | ||
|
||
- name: Upload Allure results as artifact | ||
if: always() | ||
uses: actions/[email protected] | ||
with: | ||
name: allure-results | ||
name: allure-results-${{ matrix.project }} | ||
path: automated-tests/allure-results | ||
retention-days: 5 | ||
|
||
|
@@ -91,11 +87,23 @@ jobs: | |
contents: write | ||
issues: read | ||
steps: | ||
- name: Download Allure results artifact | ||
- name: Download Allure results artifact for desktop | ||
uses: actions/[email protected] | ||
with: | ||
name: allure-results | ||
path: automated-tests/allure | ||
name: allure-results-desktop-chrome | ||
path: automated-tests/allure/desktop-chrome | ||
|
||
- name: Download Allure results artifact for mobile | ||
uses: actions/[email protected] | ||
with: | ||
name: allure-results-mobile-chrome | ||
path: automated-tests/allure/mobile-chrome | ||
|
||
- name: Merge Allure results | ||
run: | | ||
mkdir -p automated-tests/allure-results | ||
cp -r automated-tests/allure/desktop-chrome/* automated-tests/allure-results/ | ||
cp -r automated-tests/allure/mobile-chrome/* automated-tests/allure-results/ | ||
- name: Get Allure history | ||
uses: actions/[email protected] | ||
|
@@ -111,7 +119,7 @@ jobs: | |
uses: simple-elf/allure-report-action@master | ||
with: | ||
gh_pages: gh-pages | ||
allure_results: automated-tests/allure | ||
allure_results: automated-tests/allure-results | ||
allure_report: allure-report | ||
allure_history: allure-history | ||
keep_reports: 100 | ||
|
@@ -151,8 +159,10 @@ jobs: | |
uses: geekyeggo/[email protected] | ||
with: | ||
name: | | ||
playwright-report | ||
allure-results | ||
playwright-report-desktop-chrome | ||
playwright-report-mobile-chrome | ||
allure-results-desktop-chrome | ||
allure-results-mobile-chrome | ||
- name: Remove label if all test jobs succeeded | ||
uses: buildsville/[email protected] | ||
|