Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
macnev2013 committed Nov 27, 2023
1 parent 3c06c4d commit d6d3f70
Showing 1 changed file with 24 additions and 29 deletions.
53 changes: 24 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ on:
required: false
default: 30
type: number
schedule:
- cron: "*/7 * * * *"
number_of_iterations:
description: 'Number of iterations'
required: false
default: 10
type: number

jobs:
setup-matrix:
runs-on: ubuntu-latest
Expand All @@ -31,7 +35,7 @@ jobs:
test:
needs: setup-matrix
timeout-minutes: 5
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
max-parallel: 30
Expand All @@ -45,39 +49,30 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Cache Python dependencies
uses: actions/cache@v3
with:
path: |
~/.cache/pip
/home/runner/.cache/ms-playwright
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- 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: 1. Run
run: python main.py
env:
EMAIL: ${{ secrets.EMAIL }}
PASSWORD: ${{ secrets.PASSWORD }}
LOGIN_URL: ${{ secrets.LOGIN_URL }}
BROWSER_STATE: ${{ secrets.BROWSER_STATE_1 }}

- name: 2. Run
run: python main.py
env:
EMAIL: ${{ secrets.EMAIL }}
PASSWORD: ${{ secrets.PASSWORD }}
LOGIN_URL: ${{ secrets.LOGIN_URL }}
BROWSER_STATE: ${{ secrets.BROWSER_STATE_1 }}

- name: 3. Run
run: python main.py
env:
EMAIL: ${{ secrets.EMAIL }}
PASSWORD: ${{ secrets.PASSWORD }}
LOGIN_URL: ${{ secrets.LOGIN_URL }}
BROWSER_STATE: ${{ secrets.BROWSER_STATE_1 }}

- name: 4. Run
run: python main.py
- name: Running iterations ${{ github.event.inputs.number_of_iterations }} times
run: |
for i in $(seq 1 ${{ github.event.inputs.number_of_iterations }}); do
echo "Running instance $i"
python main.py
done
env:
EMAIL: ${{ secrets.EMAIL }}
PASSWORD: ${{ secrets.PASSWORD }}
Expand Down

0 comments on commit d6d3f70

Please sign in to comment.