fix: Update workflow names and conditions for E2E tests
This commit is contained in:
@@ -2,7 +2,7 @@ name: Build and Push Docker Image
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Run Tests
|
||||
- Run E2E Tests
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
name: Run E2E Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- Run Tests
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
- completed
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
name: E2E Tests
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
|
||||
runs-on: ubuntu-latest
|
||||
container: mcr.microsoft.com/playwright/python:v1.55.0-jammy
|
||||
env:
|
||||
@@ -47,7 +49,14 @@ jobs:
|
||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||
apt-get install -y nodejs
|
||||
|
||||
- name: Checkout code
|
||||
- name: Checkout code (workflow_run)
|
||||
if: ${{ github.event_name == 'workflow_run' }}
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.workflow_run.head_sha }}
|
||||
|
||||
- name: Checkout code (manual)
|
||||
if: ${{ github.event_name != 'workflow_run' }}
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Export PYTHONPATH
|
||||
|
||||
Reference in New Issue
Block a user