-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding files to pull request (#2359)
* Checking workflow * Deactivating stuff for test * Show GitHub Actions logo * checking without user config * Retrigger * Retrigger * Update the image cache * Adding comment if re-trigger * Update the image cache * Update message. Fix link * Update the image cache * Renaming user. Fixing sha * Reactivating stuff * Fixing when no changes * Adding safe.directory configuration * Update the image cache * resetting image cache to main * using pytest-pyvista from main branch. Implementing changes in ci.yml * using reset * Using --ignore_image_cache * remove flag * Checking background change * Update the image cache * resetting image cache to main * Revert "Checking background change" This reverts commit b0ee04d. * More info in the bot message * Applying review requested changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: germa89 <[email protected]>
- Loading branch information
1 parent
8a4235e
commit 727dde9
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -449,6 +449,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | ||
timeout-minutes: 55 | ||
outputs: | ||
pushed: ${{ steps.attatch-to-pr.outputs.pushed }} | ||
committed: ${{ steps.attatch-to-pr.outputs.committed }} | ||
commit_long_sha: ${{ steps.attatch-to-pr.outputs.commit_long_sha }} | ||
container: | ||
image: ghcr.io/ansys/mapdl:v22.2-ubuntu | ||
options: "-u=0:0 --entrypoint /bin/bash" | ||
|
@@ -462,6 +466,9 @@ jobs: | |
steps: | ||
- name: "Install Git and checkout project" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: "Setup Python" | ||
uses: actions/setup-python@v4 | ||
|
@@ -509,8 +516,42 @@ jobs: | |
export AWP_ROOT222=/ansys_inc | ||
xvfb-run pytest -k "not test_database and not test_dpf" \ | ||
${{ env.PYTEST_ARGUMENTS }} \ | ||
--reset_only_failed \ | ||
--cov-report=xml:ubuntu-v22.2.0-local.xml | ||
- name: "Adding the directory as safe directory for later step" | ||
run: | | ||
git config --global --add safe.directory $GITHUB_WORKSPACE | ||
- name: "Attaching modified files to PR" | ||
id: attatch-to-pr | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: Update the image cache | ||
committer_name: GitHub Actions | ||
committer_email: [email protected] | ||
add: './tests/.image_cache/*.png' | ||
|
||
- name: "PR comment with reactions" | ||
if: ${{ steps.attatch-to-pr.outputs.pushed == 'true' }} | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
message: | | ||
Hello! :wave: | ||
Your PR is changing the image cache. So I am attaching the new image cache | ||
in a new [commit](https://github.com/ansys/pymapdl/commit/${{ steps.attatch-to-pr.outputs.commit_long_sha }}). | ||
This commit does not re-run the CICD workflows (since no changes are made in the codebase) therefore | ||
you will see the actions showing in their status `Expected — Waiting for status to be reported`. Do not worry. | ||
You commit workflow is still running [here](https://github.com/ansys/pymapdl/pull/${{ github.event.pull_request.number }}/checks?sha=${{ github.event.pull_request.head.sha }}) :smile: | ||
You might want to rerun the test to make sure that everything is passing. You can retrigger the CICD sending an empty commit `git commit -m "Empty comment to trigger CICD" --allow-empty`. | ||
You will see this message everytime your commit changes the image cache but you are not attaching the updated cache. :nerd_face: | ||
reactions: rocket | ||
|
||
- uses: codecov/codecov-action@v3 | ||
name: "Upload coverage to Codecov" | ||
with: | ||
|
@@ -579,6 +620,7 @@ jobs: | |
set PYMAPDL_START_INSTANCE= | ||
python -m pytest -k "not test_database and not test_dpf" \ | ||
${{ env.PYTEST_ARGUMENTS }} \ | ||
--skip-regression-check \ | ||
--cov-report=xml:windows-v22.2.0-local.xml | ||
- uses: codecov/codecov-action@v3 | ||
|
This file contains 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