Fix augmented assignment with numpy reductions (#2544) #3
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: Anaconda-Linux | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| python_version: | |
| required: true | |
| type: string | |
| ref: | |
| required: false | |
| type: string | |
| check_run_id: | |
| required: false | |
| type: string | |
| pr_repo: | |
| required: false | |
| type: string | |
| push: | |
| branches: [devel, main] | |
| env: | |
| COMMIT: ${{ inputs.ref || github.event.ref }} | |
| PEM: ${{ secrets.BOT_PEM }} | |
| GITHUB_RUN_ID: ${{ github.run_id }} | |
| GITHUB_CHECK_RUN_ID: ${{ inputs.check_run_id }} | |
| PR_REPO: ${{ inputs.pr_repo || github.repository }} | |
| jobs: | |
| Python_version_picker: | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'push' || github.repository == 'pyccel/pyccel' | |
| outputs: | |
| python_version: ${{ steps.set-python_version.outputs.python_version }} | |
| steps: | |
| - if: github.event_name == 'push' | |
| run: | | |
| echo "version=3.13" >> $GITHUB_ENV | |
| shell: bash | |
| - id: dispatch-matrix | |
| if: github.event_name == 'workflow_dispatch' | |
| run: | | |
| echo "version=${{ inputs.python_version }}" >> $GITHUB_ENV | |
| shell: bash | |
| - id: set-python_version | |
| run: | | |
| echo "python_version=$version" >> $GITHUB_OUTPUT | |
| shell: bash | |
| Anaconda-Linux: | |
| runs-on: ubuntu-latest | |
| name: Unit tests | |
| needs: Python_version_picker | |
| steps: | |
| - id: duplicate_check | |
| uses: fkirc/skip-duplicate-actions@v5 | |
| with: | |
| # All of these options are optional, so you can remove them if you are happy with the defaults | |
| skip_after_successful_duplicate: 'true' | |
| paths: '["pyccel/**/*.py", "tests/**/*.py", "pyccel/extensions/**", ".github/workflows/anaconda_linux.yml", ".github/actions/**"]' | |
| paths_ignore: '["pyccel/version.py"]' | |
| do_not_skip: '["push"]' | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ env.COMMIT }} | |
| repository: ${{ env.PR_REPO }} | |
| submodules: true | |
| - name: Install dependencies | |
| if: steps.duplicate_check.outputs.should_skip != 'true' | |
| uses: ./.github/actions/linux_install | |
| - uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| auto-update-conda: true | |
| auto-activate-base: true | |
| python-version: ${{ needs.Python_version_picker.outputs.python_version }} | |
| - name: Install python dependencies | |
| if: steps.duplicate_check.outputs.should_skip != 'true' | |
| uses: ./.github/actions/conda_installation | |
| with: | |
| mpi_type: openmpi | |
| shell: bash | |
| - name: "Setup" | |
| if: github.event_name != 'push' | |
| id: token | |
| run: | | |
| pip install jwt requests | |
| python ci_tools/setup_check_run.py anaconda_linux | |
| shell: bash -l {0} | |
| - name: Coverage install | |
| if: steps.duplicate_check.outputs.should_skip != 'true' | |
| uses: ./.github/actions/coverage_install | |
| with: | |
| shell_cmd: "bash -l {0}" | |
| - name: Fortran/C tests with pytest | |
| if: steps.duplicate_check.outputs.should_skip != 'true' | |
| id: f_c_pytest | |
| timeout-minutes: 60 | |
| uses: ./.github/actions/pytest_run | |
| with: | |
| shell_cmd: "bash -l {0}" | |
| - name: Python tests with pytest | |
| if: steps.duplicate_check.outputs.should_skip != 'true' | |
| id: python_pytest | |
| timeout-minutes: 20 | |
| uses: ./.github/actions/pytest_run_python | |
| with: | |
| shell_cmd: "bash -l {0}" | |
| - name: Parallel tests with pytest | |
| if: steps.duplicate_check.outputs.should_skip != 'true' | |
| id: parallel | |
| timeout-minutes: 20 | |
| uses: ./.github/actions/pytest_parallel | |
| with: | |
| shell_cmd: "bash -l {0}" | |
| - name: Collect coverage information | |
| if: steps.duplicate_check.outputs.should_skip != 'true' | |
| continue-on-error: True | |
| uses: ./.github/actions/coverage_collection | |
| with: | |
| shell_cmd: "bash -l {0}" | |
| - name: Save code coverage report | |
| if: steps.duplicate_check.outputs.should_skip != 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-artifact | |
| path: .coverage | |
| retention-days: 1 | |
| include-hidden-files: true | |
| - name: "Post completed" | |
| if: always() && github.event_name != 'push' && steps.duplicate_check.outputs.should_skip != 'true' | |
| run: | |
| python ci_tools/complete_check_run.py ${{ steps.f_c_pytest.outcome }} ${{ steps.python_pytest.outcome }} ${{ steps.parallel.outcome }} | |
| shell: bash -l {0} | |
| - name: "Post completed" | |
| if: always() && github.event_name != 'push' && steps.duplicate_check.outputs.should_skip == 'true' | |
| run: | |
| python ci_tools/complete_check_run.py 'success' | |
| shell: bash -l {0} |