forked from opendatahub-io/pipelines-components
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (59 loc) · 1.83 KB
/
Copy pathscripts-tests.yml
File metadata and controls
68 lines (59 loc) · 1.83 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
64
65
66
67
68
---
name: Scripts Unit Tests
on:
push:
pull_request:
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- 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 -m "not gh_api"
else
echo "No */tests directories found under '${{ matrix.scripts-dir }}'; skipping."
fi
api-tests:
runs-on: ubuntu-24.04
name: API tests (.github/scripts)
steps:
- name: Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Python CI
uses: ./.github/actions/setup-python-ci
with:
python-version: "3.13"
- name: Run API tests
working-directory: .github/scripts
shell: bash
run: |
if compgen -G "*/tests" > /dev/null; then
uv run pytest */tests/ -v --tb=short -m gh_api
else
echo "No */tests directories found; skipping."
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}