-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (38 loc) · 1.37 KB
/
ci_test.yml
File metadata and controls
45 lines (38 loc) · 1.37 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
name: CI Parent Pipeline
on:
push:
branches: ["ci_test"]
pull_request:
branches: ["ci_test"]
jobs:
prepare:
name: Generate matrix from config
runs-on: ubuntu-latest
outputs:
matrix_json_for_unittest: ${{ steps.generate.outputs.matrix_json_for_unittest }}
job_types_with_jobs: ${{ steps.generate.outputs.job_types_with_jobs }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install converter dependency
run: pip install pyyaml
- name: Convert .ci/config.yaml to matrix JSON (by job type)
id: generate
run: python .ci/scripts/config_to_matrix.py --config .ci/config.yaml --write-github-outputs
- name: Show generated job types
run: |
echo "job_types_with_jobs=${{ steps.generate.outputs.job_types_with_jobs }}"
echo "matrix_json_for_unittest=${{ steps.generate.outputs.matrix_json_for_unittest }}"
run-child-unittest:
name: Execute unittest child pipeline
needs: prepare
if: contains(fromJSON(needs.prepare.outputs.job_types_with_jobs), 'unittest')
uses: ./.github/workflows/ci_child_for_unittest.yml
with:
matrix_json: ${{ needs.prepare.outputs.matrix_json_for_unittest }}