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:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows:
|
workflows:
|
||||||
- Run Tests
|
- Run E2E Tests
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
types:
|
types:
|
||||||
|
|||||||
@@ -1,17 +1,19 @@
|
|||||||
name: Run E2E Tests
|
name: Run E2E Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
branches:
|
workflows:
|
||||||
- '**'
|
- Run Tests
|
||||||
pull_request:
|
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
e2e:
|
e2e:
|
||||||
name: E2E Tests
|
name: E2E Tests
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: mcr.microsoft.com/playwright/python:v1.55.0-jammy
|
container: mcr.microsoft.com/playwright/python:v1.55.0-jammy
|
||||||
env:
|
env:
|
||||||
@@ -47,7 +49,14 @@ jobs:
|
|||||||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||||
apt-get install -y nodejs
|
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
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Export PYTHONPATH
|
- name: Export PYTHONPATH
|
||||||
|
|||||||
Reference in New Issue
Block a user