-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Combine 2 fixes so that enough checks pass to be able to merge #15771
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -206,7 +206,7 @@ jobs: | |
|
||
- name: Upload debug output | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: awx-operator-debug-output | ||
path: ${{ env.DEBUG_OUTPUT_DIR }} | ||
|
@@ -328,7 +328,7 @@ jobs: | |
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
# Upload coverage report as artifact | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: coverage-${{ matrix.target-regex.name }} | ||
|
@@ -359,19 +359,29 @@ jobs: | |
- name: Upgrade ansible-core | ||
run: python3 -m pip install --upgrade ansible-core | ||
|
||
- name: Download coverage artifacts | ||
uses: actions/download-artifact@v3 | ||
- name: Download coverage artifacts A to H | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: coverage-a-h | ||
path: coverage | ||
|
||
- name: Download coverage artifacts I to P | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: coverage-i-p | ||
path: coverage | ||
|
||
- name: Download coverage artifacts Z to Z | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: coverage-r-z0-9 | ||
path: coverage | ||
|
||
- name: Combine coverage | ||
run: | | ||
make COLLECTION_VERSION=100.100.100-git install_collection | ||
mkdir -p ~/.ansible/collections/ansible_collections/awx/awx/tests/output/coverage | ||
cd coverage | ||
for i in coverage-*; do | ||
cp -rv $i/* ~/.ansible/collections/ansible_collections/awx/awx/tests/output/coverage/ | ||
done | ||
cp -rv coverage/* ~/.ansible/collections/ansible_collections/awx/awx/tests/output/coverage/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this feels equivalent There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be good to have better documentation. But this is tied into the change in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It's not quite. The previous one iterates all directories starting with Something like this might be equivalent if you really want to lose the loop:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But it sounds like this recursion is unnecessary now based on what @AlanCoding is saying. It sounds like there's no inner directory anymore? |
||
cd ~/.ansible/collections/ansible_collections/awx/awx | ||
ansible-test coverage combine --requirements | ||
ansible-test coverage html | ||
|
@@ -424,7 +434,7 @@ jobs: | |
done | ||
|
||
- name: Upload coverage report as artifact | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: awx-collection-integration-coverage-html | ||
path: ~/.ansible/collections/ansible_collections/awx/awx/tests/output/reports/coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dislike the "groups" being hardcoded here 😕 - when I wrote this I tried really hard to make sure there was only one place the groups had to be defined (and that was in the CI matrix that actually splits up the groups.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In prior state, to accomplish that, the coverage files were uploaded with the same
name
. Apparently, uploading with the same name resulted in merging them into the same folder, or using subfolders specified bypath
. This specific behavior was yanked from the Github action, so thatname
must always be unique. The need to download each became a problem with this change from the upload-artifact action. If this is not satisfied, it outright fails the check whenever you get to the step.