Skip to content

Commit 5c34286

Browse files
committed
yaml sequence fix
1 parent 958290a commit 5c34286

File tree

4 files changed

+27
-15
lines changed

4 files changed

+27
-15
lines changed

.github/workflows/README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ This project uses the following workflows in a specific sequence:
1010
- **Execution time**: ~1-2 minutes
1111

1212
### 2. `quick-test.yml` - Quick Tests
13-
- **Trigger**: Push/PR to main/develop
13+
- **Trigger**: After `validate-workflows.yml` succeeds, or PR/manual
1414
- **Purpose**: Fast functionality check (1 sec video/audio)
1515
- **Execution time**: ~3-5 minutes
1616

1717
## Periodic/Manual Workflows
1818

1919
### 3. `test.yml` - Full Testing
20-
- **Trigger**: Schedule (daily at 2:00 UTC) or manual run
20+
- **Trigger**: After `quick-test.yml` succeeds, schedule (daily at 2:00 UTC), or manual run
2121
- **Purpose**: Complete unit/integration/performance tests on all platforms
2222
- **Execution time**: ~15-30 minutes
2323

2424
### 4. `build.yml` - Build Artifacts
25-
- **Trigger**: Push to main (only on code changes) or manual run
25+
- **Trigger**: After `test.yml` succeeds on main branch, or manual run
2626
- **Purpose**: Build binaries for all platforms (Linux, Windows, macOS Intel/ARM)
2727
- **Execution time**: ~10-15 minutes
2828
- **Artifacts**: Ready-to-use executable files
@@ -39,17 +39,22 @@ This project uses the following workflows in a specific sequence:
3939

4040
```mermaid
4141
graph TD
42-
A[Push/PR] --> B[validate-workflows.yml]
43-
A --> C[quick-test.yml]
44-
45-
D[Push to main] --> E[build.yml]
42+
A[Push to main/develop] --> B[validate-workflows.yml]
43+
B --> |success| C[quick-test.yml]
44+
C --> |success| D[test.yml - Full Tests]
45+
D --> |success + main branch| E[build.yml]
4646
E --> F[Artifacts Ready]
4747
4848
G[Manual Run] --> H[manual-release.yml]
4949
H --> I[Downloads artifacts from build.yml]
5050
I --> J[Creates GitHub Release]
5151
52-
K[Schedule/Manual] --> L[test.yml]
52+
K[Schedule] --> D
53+
L[Manual] --> D
54+
M[Manual] --> E
55+
56+
N[PR] --> B
57+
N --> C
5358
```
5459

5560
## Optimizations

.github/workflows/build.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
name: Build Artifacts
22

33
on:
4-
push:
4+
workflow_run:
5+
workflows: ["Test Suite"]
6+
types: [completed]
57
branches: [main]
6-
paths-ignore:
7-
- '**.md'
8-
- '.github/workflows/validate-workflows.yml'
9-
- '.github/workflows/quick-test.yml'
10-
- '.github/workflows/test.yml'
118
workflow_dispatch:
129
inputs:
1310
platforms:
@@ -25,6 +22,7 @@ jobs:
2522
build:
2623
name: Build for ${{ matrix.os }}
2724
runs-on: ${{ matrix.runner }}
25+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' }}
2826
strategy:
2927
matrix:
3028
include:

.github/workflows/quick-test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
name: Quick Tests
22

33
on:
4-
push:
4+
workflow_run:
5+
workflows: ["Validate Workflows"]
6+
types: [completed]
57
branches: [main, develop]
68
pull_request:
79
branches: [main]
10+
workflow_dispatch:
811

912
jobs:
1013
quick-tests:
1114
name: Quick Tests
1215
runs-on: ubuntu-latest
16+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
1317
steps:
1418
- name: Checkout code
1519
uses: actions/checkout@v4

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Test Suite
22

33
on:
4+
workflow_run:
5+
workflows: ["Quick Tests"]
6+
types: [completed]
7+
branches: [main, develop]
48
schedule:
59
# Run comprehensive tests daily at 2 AM UTC
610
- cron: '0 2 * * *'
@@ -21,6 +25,7 @@ jobs:
2125
validate:
2226
name: Validate Workflows
2327
runs-on: ubuntu-latest
28+
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
2429
steps:
2530
- name: Checkout code
2631
uses: actions/checkout@v4

0 commit comments

Comments
 (0)