-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (51 loc) · 1.43 KB
/
test.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
name: Playwright Tests
on:
# push:
# branches: [ main, master ]
# pull_request:
# branches: [ main, master ]
workflow_dispatch:
inputs:
number_of_runs:
description: 'Number of runs'
required: true
type: number
jobs:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
echo "::set-output name=matrix::$(jq -nc --argjson number ${{ github.event.inputs.number_of_runs }} '{"instance": [range(1; $number+1)]}')"
test:
timeout-minutes: 5
needs: prepare-matrix
runs-on: ubuntu-latest
strategy:
max-parallel: 30
matrix:
matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v3
with:
repository: macnev2013/p_pw_mg
token: ${{ secrets.ACCESS_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Ensure browsers are installed
run: python -m playwright install
- name: Run
run: python main.py
env:
EMAIL: ${{ secrets.EMAIL }}
PASSWORD: ${{ secrets.PASSWORD }}
LOGIN_URL: ${{ secrets.LOGIN_URL }}
BROWSER_STATE: ${{ secrets.BROWSER_STATE_1 }}