diff --git a/.github/workflows/functional.yaml b/.github/workflows/functional.yaml index 6e80859dd64..f3f05168ce0 100644 --- a/.github/workflows/functional.yaml +++ b/.github/workflows/functional.yaml @@ -1,4 +1,4 @@ -name: Functional tests +name: Functional tests (all devices) on: schedule: @@ -10,6 +10,7 @@ jobs: name: Test strategy: + fail-fast: false matrix: device: - Desktop Chrome diff --git a/.github/workflows/functional_selected_device.yaml b/.github/workflows/functional_selected_device.yaml new file mode 100644 index 00000000000..ad8e7c463b2 --- /dev/null +++ b/.github/workflows/functional_selected_device.yaml @@ -0,0 +1,52 @@ +name: Functional tests (selected device) + +on: + workflow_dispatch: + inputs: + device: + description: 'Device to test (exact name - defaults to "Desktop Chrome")' + required: false + default: 'Desktop Chrome' + pull_request: + +jobs: + test: + name: Test + + permissions: {} + + runs-on: ubuntu-latest + + env: + TZ: "Europe/London" + + steps: + - uses: actions/checkout@v4 + + - name: Set device variable + id: set-device + run: | + if [ "${{ github.event_name }}" = "pull_request" ]; then + echo "device=Desktop Chrome" >> $GITHUB_OUTPUT + else + echo "device=${{ github.event.inputs.device }}" >> $GITHUB_OUTPUT + fi + + - name: Install uv + uses: astral-sh/setup-uv@v6 + + - name: Install Playwright + run: uv run playwright install --with-deps + + - name: Run tests + run: uv run pytest --device "${{ steps.set-device.outputs.device }}" + env: + BASE_URL: ${{ vars.BASE_URL }} + BASIC_AUTH_PASSWORD: ${{ secrets.BASIC_AUTH_PASSWORD }} + BASIC_AUTH_USERNAME: ${{ secrets.BASIC_AUTH_USERNAME }} + + - name: Upload Allure results + uses: actions/upload-artifact@v4 + with: + name: results + path: allure-results