Revision control

Copy as Markdown

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@11d5960a326750d5838078e36cf38b85af677262 # 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@49933ea5288caeca8642d1e84afbd3f7d6820020 # 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: Set job log URL
if: always()
run: echo "JOB_LOG_URL=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV
- name: Send Slack notification if tests fail
if: '${{ !cancelled() && !github.event.pull_request.head.repo.fork }}'
id: slack
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
with:
payload-file-path: "./test-fixtures/ci/slack-notification-payload-generic.json"
payload-templated: true
webhook: ${{ secrets.WEBHOOK_SLACK_TOKEN }}
webhook-type: incoming-webhook
env:
ACTION_NAME: credential provider playwrite tests
JOB_STATUS: ${{ job.status == 'success' && ':white_check_mark:' || job.status == 'failure' && ':x:' }}
JOB_STATUS_COLOR: ${{ job.status == 'success' && '#36a64f' || job.status == 'failure' && '#FF0000' }}