forked from mozilla-mobile/firefox-ios
-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (68 loc) · 2.07 KB
/
firefox-ios-autofill-playwrite-tests.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
70
name: Build and Run Autofill Automation
permissions: read-all
on:
workflow_call:
secrets:
SLACK_WEBHOOK_URL:
required: true
workflow_dispatch: {}
pull_request:
paths:
- 'firefox-ios/Client/Assets/CC_Script/**'
push:
branches: ['main']
paths:
- 'firefox-ios/Client/Assets/CC_Script/**'
jobs:
build:
runs-on: macos-13
timeout-minutes: 40
strategy:
matrix:
python-version: [3.9]
xcode: ["15.2"]
continue-on-error: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get the current github action name
run: |
github_action_name="Update credential provider script"
echo "github_action_name=$github_action_name" >> $GITHUB_ENV
- name: Clone repository
run: |
git clone https://github.com/issammani/test-playwright.git
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18
- run: |
echo "Install dependencies and run tests"
npm i
npm install --save concurrently
npm i -D @playwright/test
cd test-playwright
echo "Install playwright"
npx playwright install
echo "Run tests"
npm test
- name: Send Slack notification if tests fail
if: '!cancelled()'
id: slack
uses: slackapi/[email protected]
with:
payload: |
{
"text": "GitHub Action Running Tests For ${{ env.github_action_name }} result: ${{ job.status }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action Running Tests For result: ${{ job.status }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}