Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding files to pull request #2359

Merged
merged 30 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9ad1112
Checking workflow
germa89 Sep 25, 2023
ce005c3
Deactivating stuff for test
germa89 Sep 25, 2023
0dd9721
Show GitHub Actions logo
github-actions[bot] Sep 25, 2023
642a8bf
checking without user config
germa89 Sep 25, 2023
4ee94ca
delete temp file
germa89 Sep 25, 2023
2b2fc5e
Retrigger
germa89 Sep 25, 2023
432b951
Retrigger
germa89 Sep 25, 2023
bf91437
Update the image cache
germa89 Sep 25, 2023
9516d88
Adding comment if re-trigger
germa89 Sep 25, 2023
82a0e93
Update the image cache
germa89 Sep 25, 2023
2973b02
Update message. Fix link
germa89 Sep 25, 2023
958237e
Update the image cache
germa89 Sep 25, 2023
cae0fb8
Renaming user. Fixing sha
germa89 Sep 25, 2023
383f865
Reactivating stuff
germa89 Sep 25, 2023
326d17a
Fixing when no changes
germa89 Sep 25, 2023
6086665
Adding safe.directory configuration
germa89 Sep 25, 2023
689bd6b
Update the image cache
germa89 Sep 25, 2023
1626766
resetting image cache to main
germa89 Sep 28, 2023
1b294f1
using pytest-pyvista from main branch. Implementing changes in ci.yml
germa89 Sep 28, 2023
1f229e1
using reset
germa89 Sep 28, 2023
fe4973c
Merge branch 'main' into ci/adding-modified-files-to-pr
germa89 Sep 28, 2023
5ce98a4
Using --ignore_image_cache
germa89 Sep 28, 2023
05b8519
remove flag
germa89 Sep 28, 2023
b0ee04d
Checking background change
germa89 Sep 28, 2023
228e367
Update the image cache
germa89 Sep 28, 2023
717d537
resetting image cache to main
germa89 Sep 28, 2023
a84460e
Revert "Checking background change"
germa89 Sep 28, 2023
69b2c9a
More info in the bot message
germa89 Sep 28, 2023
0905083
Merge branch 'main' into ci/adding-modified-files-to-pr
germa89 Sep 28, 2023
1547710
Applying review requested changes
germa89 Sep 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 }}
germa89 marked this conversation as resolved.
Show resolved Hide resolved

- name: "Setup Python"
uses: actions/setup-python@v4
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ tests = [
"pyansys-tools-report==0.6.0",
"vtk==9.2.6",
"pytest-rerunfailures==12.0",
"pytest-pyvista==0.1.8",
"pytest-pyvista==0.1.9",
]
doc = [
"sphinx==7.2.6",
Expand Down