Skip to content

Commit

Permalink
add(ci): updates to tests CI to run desktop and mobile (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
luisecm authored Oct 10, 2024
1 parent 2625808 commit 2d41e5e
Showing 1 changed file with 27 additions and 17 deletions.
44 changes: 27 additions & 17 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 2d41e5e

Please sign in to comment.