updates #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI Smoketest Dispatch | |
| on: | |
| push: | |
| branches: ["ci_test"] | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: "Branch or tag to run smoketest from" | |
| required: false | |
| default: "ci_test" | |
| type: string | |
| jobs: | |
| prepare: | |
| name: Generate smoketest matrix from config | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix_json_for_smoketest: ${{ steps.generate.outputs.matrix_json_for_smoketest }} | |
| job_types_with_jobs: ${{ steps.generate.outputs.job_types_with_jobs }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref_name }} | |
| 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_smoketest=${{ steps.generate.outputs.matrix_json_for_smoketest }}" | |
| run-child-smoketest: | |
| name: Execute smoketest child pipeline | |
| needs: prepare | |
| if: contains(fromJSON(needs.prepare.outputs.job_types_with_jobs), 'smoketest') | |
| uses: ./.github/workflows/ci_child_for_smoketest.yml | |
| with: | |
| matrix_json: ${{ needs.prepare.outputs.matrix_json_for_smoketest }} |