-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (58 loc) · 2.34 KB
/
playwright.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Generate lighthouse test report on PR
on:
pull_request:
branches: [ main ]
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 playwright
run: npx playwright install
- name: run playwright
id: tests
run: npx playwright test --project=firefox
continue-on-error: true
- name: Notify on Google Chat
uses: Co-qn/google-chat-notification@v1
with:
name: test
url: ${{ secrets.TEST_GOOGLE_CHAT_WEBHOOK_URL }}
status: ${{ steps.tests.outcome }}
# - name: Check test result and comment
# uses: peter-evans/create-or-update-comment@v1
# with:
# token: ${{ secrets.GITHUB_APP_TOKEN }}
# issue-number: ${{ github.event.pull_request.number }}
# body: |
# ${{ steps.tests.outcome == 'failed' && 'Test failed, Please check logs for details.' || 'Test passed :heavy_check_mark:' }}
- uses: actions/checkout@master
- run: mkdir -p ${{ github.workspace }}/tmp/artifacts
- name: Lighthouse
uses: foo-software/lighthouse-check-action@master
with:
outputDirectory: ${{ github.workspace }}/tmp/artifacts
gitHubAccessToken: ${{ secrets.POST_DEPLOY_TARGET_GITHUB_APP_TOKEN }}
urls: 'https://yral.com/'
- name: Upload artifacts
uses: actions/upload-artifact@master
with:
name: Lighthouse reports
path: ${{ github.workspace }}/tmp/artifacts
- name: Trigger a workflow in another repo
uses: actions/github-script@v5
with:
script: |
github.rest.repos.createDispatchEvent({
owner: 'shreybaz',
repo: 'test_automation',
event_type: 'call',
client_payload: { key: "value" }
});
github-token: ${{ secrets.POST_DEPLOY_TARGET_GITHUB_APP_TOKEN }}