Skip to content

Update playwright.yml #13

Update playwright.yml

Update playwright.yml #13

Workflow file for this run

name: Generate lighthouse test report on PR
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
repository_dispatch:
types: [call]
jobs:
automation-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- name: Install Lighthouse
run: npm install -g @lhci/cli@0.13.x
- name: Run Lighthouse
# run: lhci autorun --upload.githubToken="$LHCI_GITHUB_TOKEN" || echo "LHCI failed!"
run: lhci autorun
# env:
# LHCI_GITHUB_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
- name: install playwright
run: npx playwright install
- name: run playwright
id: tests
# run: TESTPARAM=${{secrets.MAIL_PASSWORD}} npx playwright test --project=firefox
run: npx playwright test --project=firefox
# - name: Check test result and comment
# uses: peter-evans/create-or-update-comment@v1
# with:
# token: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
# issue-number: ${{ github.event.pull_request.number }}
# body: |
# ${{ steps.tests.outcome == '2 passed' && 'Test passed :heavy_check_mark:' || 'Test failed, Please check logs for details.' }}