-
Notifications
You must be signed in to change notification settings - Fork 28
63 lines (56 loc) · 1.87 KB
/
component-pipeline-tests.yml
File metadata and controls
63 lines (56 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
name: Run Tests and Validate Example Pipelines for Updated Components
on:
pull_request:
branches:
- "main"
- "release-*"
paths:
- "components/**"
- "pipelines/**"
- "scripts/tests/**"
- "scripts/validate_examples/**"
- ".github/workflows/component-pipeline-tests.yml"
push:
branches:
- "main"
- "release-*"
paths:
- "components/**"
- "pipelines/**"
- "scripts/tests/**"
- "scripts/validate_examples/**"
- ".github/workflows/component-pipeline-tests.yml"
jobs:
targeted-tests:
runs-on: ubuntu-24.04
permissions:
contents: read
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Python CI
uses: ./.github/actions/setup-python-ci
with:
python-version: "3.11"
- name: Detect changed files
id: changes
uses: ./.github/actions/detect-changed-assets
- name: Run targeted pytest suites
if: ${{ steps.changes.outputs.has-changes == 'true' }}
run: |
echo "Running pytest for the following paths:"
PATHS="${{ steps.changes.outputs.changed-components }} ${{ steps.changes.outputs.changed-pipelines }}"
echo "$PATHS"
uv run python -m scripts.tests.run_component_tests $PATHS
- name: Validate example pipelines
if: ${{ steps.changes.outputs.has-changes == 'true' }}
run: |
echo "Validating example pipelines for:"
PATHS="${{ steps.changes.outputs.changed-components }} ${{ steps.changes.outputs.changed-pipelines }}"
echo "$PATHS"
uv run python -m scripts.validate_examples $PATHS
- name: No component changes detected
if: ${{ steps.changes.outputs.has-changes != 'true' }}
run: echo "No components or pipelines changed. Skipping targeted tests."