feat[next-dace]: Updated MoveDataflowIntoIfBody
#3039
Workflow file for this run
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: "Test code components (CPU)" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| # First job to read Python versions from .python-versions file | |
| get-python-versions: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| python-versions: ${{ steps.get-versions.outputs.python-versions }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - id: get-versions | |
| uses: ./.github/actions/get-python-versions | |
| # Job to exclude unnecessary test sessions based on the changed files | |
| define-test-sessions-exclusions: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| test-sessions-exclusions: ${{ steps.test-sessions-exclusions.outputs.test-sessions-exclusions }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Use a deep clone to get target PR branch | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Define test sessions based on changed files | |
| id: test-sessions-exclusions | |
| run: | | |
| if [ "${{ github.event_name }}" == "pull_request" ]; then | |
| # Exclude test sessions not affected by the PR changes | |
| ./scripts-cli.py github-ci matrix-exclude \ | |
| --config nox-sessions-config.yml \ | |
| --base "origin/${{ github.base_ref }}" \ | |
| --output gh-exclude-test-sessions.json \ | |
| --verbose | |
| else | |
| # Run all sessions without any exclusions | |
| echo "[]" > gh-exclude-test-sessions.json | |
| fi | |
| # If needed, more static exclusions can be added here and they will be | |
| # combined with the dynamically generated array of exclusions. | |
| # Example: $ echo '[{"nox-session": "test_foo"}]' > static-exclude.json | |
| echo '[]' > static-exclude.json | |
| jq -s 'add' static-exclude.json gh-exclude-test-sessions.json > all-exclusions.json | |
| # Output the final exclusions for the test sessions | |
| echo 'test-sessions-exclusions<<EOF' >> $GITHUB_OUTPUT | |
| cat all-exclusions.json >> $GITHUB_OUTPUT | |
| echo '' >> $GITHUB_OUTPUT | |
| echo 'EOF' >> $GITHUB_OUTPUT | |
| # Test-running job | |
| test-component: | |
| needs: [get-python-versions, define-test-sessions-exclusions] | |
| strategy: | |
| matrix: | |
| os: ["ubuntu-latest"] | |
| python-version: ${{ fromJSON(needs.get-python-versions.outputs.python-versions) }} | |
| nox-session: | |
| - name: test_cartesian | |
| args: "(internal, cpu)" | |
| - name: test_cartesian | |
| args: "(dace, cpu)" | |
| - name: test_eve | |
| args: "" | |
| - name: test_next | |
| args: "(internal, cpu, nomesh)" | |
| - name: test_next | |
| args: "(dace, cpu, nomesh)" | |
| - name: test_next | |
| args: "(internal, cpu, atlas)" | |
| - name: test_next | |
| args: "(dace, cpu, atlas)" | |
| - name: test_storage | |
| args: "(cpu)" | |
| exclude: ${{ fromJSON(needs.define-test-sessions-exclusions.outputs.test-sessions-exclusions) }} | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| python-version: ${{ matrix.python-version }} | |
| - name: Run '${{ matrix.nox-session.name }}-${{ matrix.python-version }}(${{ matrix.nox-session.args }})' nox session | |
| shell: bash | |
| run: | | |
| ./noxfile.py -s '${{ matrix.nox-session.name }}-${{ matrix.python-version }}${{ matrix.nox-session.args }}' |