Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/devRun.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Pre merge test

on:
Expand Down
50 changes: 39 additions & 11 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Nightly regression tests

on:
Expand All @@ -12,10 +9,31 @@ on:
description: 'Custom pytest command'
required: true
default: '-m "not devRun"'
type: string
parallelism:
description: 'Number of machines to split tests'
required: false
default: 2
type: number

jobs:
nightly:
setup-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
count=${{ github.event.inputs.parallelism || 2 }}
matrix=$(seq -s ',' 1 $count)
echo "matrix=$(jq -cn --argjson groups "[$matrix]" '{group: $groups}')" >> $GITHUB_OUTPUT

nightly-test:
needs: setup-matrix
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
env:
EMAIL: ${{ secrets.EMAIL }}
PASSWORD: ${{ secrets.PASSWORD }}
Expand All @@ -39,16 +57,26 @@ jobs:
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install Dependencies
run: poetry install --no-interaction --no-root
- name: Run custom pytest command
if: github.event_name == 'workflow_dispatch'
- name: Run Tests
run: |
source .venv/bin/activate
xvfb-run pytest ${{ github.event.inputs.pytest_command }} --base-url ${{ vars.BASE_URL }}
- name: Run default pytest command
if: github.event_name != 'workflow_dispatch'
xvfb-run pytest ${{ github.event.inputs.pytest_command || '-m "not devRun"' }} \
--base-url ${{ vars.BASE_URL }} \
--splits ${{ github.event.inputs.parallelism || 2 }} \
--group ${{ matrix.group }}

merge-reports:
needs: nightly-test
if: always()
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Merge Allure Results
run: |
source .venv/bin/activate
xvfb-run pytest -m "not devRun" --base-url ${{ vars.BASE_URL }}
mkdir -p allure-results
for dir in artifacts/test-results-*/allure-results; do
cp -r $dir/* allure-results/
done
- name: Link Git Information And Browser Version To Allure Report
working-directory: allure-results
if: always()
Expand Down