forked from kubeflow/pipelines-components
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (46 loc) · 1.2 KB
/
scripts-tests.yml
File metadata and controls
52 lines (46 loc) · 1.2 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
---
name: Scripts Unit Tests
on:
push:
branches:
- 'main'
- 'release-*'
tags:
- 'v*'
pull_request:
branches:
- 'main'
- 'release-*'
paths:
- '.github/scripts/**'
- 'scripts/**'
- '.github/workflows/scripts-tests.yml'
- '.github/actions/setup-python-ci/**'
- 'pyproject.toml'
- 'uv.lock'
jobs:
test-scripts:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.11", "3.13"]
scripts-dir:
- .github/scripts
- scripts
name: Test ${{ matrix.scripts-dir }} (Python ${{ matrix.python-version }})
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Setup Python CI
uses: ./.github/actions/setup-python-ci
with:
python-version: ${{ matrix.python-version }}
- name: Run tests (${{ matrix.scripts-dir }})
working-directory: ${{ matrix.scripts-dir }}
shell: bash
run: |
if compgen -G "*/tests" > /dev/null; then
uv run pytest */tests/ -v --tb=short
else
echo "No */tests directories found under '${{ matrix.scripts-dir }}'; skipping."
fi