Skip to content

Use yaml file instead of deprecated .docstr_coverage file (#1816) #139

Use yaml file instead of deprecated .docstr_coverage file (#1816)

Use yaml file instead of deprecated .docstr_coverage file (#1816) #139

Workflow file for this run

name: Intel unit tests
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
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 }}
PYCCEL_DEFAULT_COMPILER: 'intel'
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.10" >> $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
Intel:
runs-on: ubuntu-latest
name: Unit tests
needs: Python_version_picker
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.COMMIT }}
repository: ${{ env.PR_REPO }}
- name: Set up Python ${{ needs.Python_version_picker.outputs.python_version }}
uses: actions/setup-python@v4
with:
python-version: ${{ needs.Python_version_picker.outputs.python_version }}
- name: "Setup"
id: token
run: |
pip install jwt requests
python ci_tools/setup_check_run.py intel
- name: Install dependencies
uses: ./.github/actions/intel_install
- name: Install Pyccel with tests
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
shell: bash
- name: Coverage install
uses: ./.github/actions/coverage_install
- name: Fortran/C tests with pytest
id: f_c_pytest
timeout-minutes: 60
uses: ./.github/actions/pytest_run
- name: Python tests with pytest
id: python_pytest
timeout-minutes: 20
uses: ./.github/actions/pytest_run_python
- name: Parallel tests with pytest
id: parallel
timeout-minutes: 20
uses: ./.github/actions/pytest_parallel
- name: Test with valgrind for memory leaks
id: valgrind
uses: ./.github/actions/valgrind_run
- name: Collect coverage information
continue-on-error: True
uses: ./.github/actions/coverage_collection
- name: Save code coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-artifact
path: .coverage
retention-days: 1
- name: "Post completed"
if: always()
run:
python ci_tools/complete_check_run.py ${{ steps.f_c_pytest.outcome }} ${{ steps.python_pytest.outcome }} ${{ steps.parallel.outcome }} ${{ steps.valgrind.outcome }}