Skip to content

Commit

Permalink
Merge pull request #33 from pyccel/ebourne_bot_fix
Browse files Browse the repository at this point in the history
Fix bot issues

Fix several minor bugs with the bot. Namely:

indenting in pytest_run/action.yml which prevents tests from running
Ordering of setup in cuda workflow preventing setup action from running
Missing argument to setup.py
Missing description for cuda test
Ensure cuda tests are triggered on devel branch
Report outcome of cuda step
  • Loading branch information
EmilyBourne authored Jan 16, 2024
2 parents 2d0fbff + 32fb825 commit 980b393
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/actions/pytest_run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ runs:
# Test ndarray folder update (requires parallel tests to avoid clean)
touch ${SITE_DIR}/pyccel/stdlib/cwrapper/cwrapper.h
python -m pytest -n auto -rXx ${FLAGS} -m c -k test_array_int32_1d_scalar epyccel/test_arrays.py 2>&1 | tee s2_outfile.out
fi
fi
shell: ${{ inputs.shell_cmd }}
working-directory: ./tests
id: pytest_2
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ jobs:
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
shell: bash
- name: CUDA Version
run: nvcc --version # cuda install check
- name: Install python (setup-python action doesn't work with containers)
uses: ./.github/actions/python_install
- name: "Setup"
id: token
run: |
pip install jwt requests
python ci_tools/setup_check_run.py
python ci_tools/setup_check_run.py cuda
- name: CUDA Version
run: nvcc --version # cuda install check
- name: Install dependencies
uses: ./.github/actions/linux_install
- name: Install python (setup-python action doesn't work with containers)
uses: ./.github/actions/python_install
- name: Install Pyccel with tests
run: |
PATH=${PATH}:$HOME/.local/bin
Expand All @@ -63,6 +63,7 @@ jobs:
- name: Coverage install
uses: ./.github/actions/coverage_install
- name: Ccuda tests with pytest
id: cuda_pytest
uses: ./.github/actions/pytest_run_cuda
- name: Collect coverage information
continue-on-error: True
Expand All @@ -76,5 +77,5 @@ jobs:
- 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 }}
python ci_tools/complete_check_run.py ${{ steps.cuda_pytest.outcome }}

5 changes: 3 additions & 2 deletions ci_tools/bot_tools/bot_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
'pyccel_lint': "Pyccel best practices",
'pylint': "Python linting",
'spelling': "Spelling verification",
'windows': "Unit tests on Windows"
'windows': "Unit tests on Windows",
'cuda': "Unit tests on Linux with cuda"
}

test_dependencies = {'coverage':['linux', 'cuda']}
Expand Down Expand Up @@ -418,7 +419,7 @@ def is_test_required(self, commit_log, name, key, state):
True if the test should be run, False otherwise.
"""
print("Checking : ", name)
if key in ('linux', 'windows', 'macosx', 'anaconda_linux', 'anaconda_windows', 'coverage', 'intel'):
if key in ('linux', 'windows', 'macosx', 'anaconda_linux', 'anaconda_windows', 'coverage', 'intel', 'cuda'):
has_relevant_change = lambda diff: any((f.startswith('pyccel/') or f.startswith('tests/')) #pylint: disable=unnecessary-lambda-assignment
and f.endswith('.py') and f != 'pyccel/version.py'
for f in diff)
Expand Down
1 change: 1 addition & 0 deletions ci_tools/devel_branch_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
bot.run_tests(['anaconda_linux'], '3.10', force_run = True)
bot.run_tests(['anaconda_windows'], '3.10', force_run = True)
bot.run_tests(['intel'], '3.9', force_run = True)
bot.run_tests(['cuda'], '-', force_run = True)

0 comments on commit 980b393

Please sign in to comment.