Skip to content

Split debug artifacts PR check into two jobs #1160

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

Merged
merged 10 commits into from
Aug 4, 2022
Prev Previous commit
Next Next commit
Remove ls check, log formatting
  • Loading branch information
angelapwen committed Aug 3, 2022
commit e16d085a47850ebcd88cf09e955f002f5db803f4
6 changes: 2 additions & 4 deletions .github/workflows/debug-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ jobs:
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- name: Check expected artifacts exist
shell: bash
run: |
Expand All @@ -62,9 +60,9 @@ jobs:
for os in $OPERATING_SYSTEMS; do
for version in $VERSIONS; do
cd ./my-debug-artifacts-$os-$version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotes not essential but a good habit.
I observe this cd will fail if the artifact dir doesn't exist, but I think that's ok and will give us a reasonable error message. We can improve it in future if necessary.

Suggested change
cd ./my-debug-artifacts-$os-$version
cd "./my-debug-artifacts-$os-$version"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah interesting.. I wonder if it fails if it will continue onto the next directory? Probably not..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will not. This is because by default Actions runs bash steps with set -e (set -eo pipefail specifically; see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell), so any shell command exiting non-zero will fail the entire step.

You can turn this off in a given step by adding set +e at the beginning, but we don't need that here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! Thanks!

echo "Checking version $version on $os"
echo "Artifacts from version $version on $os:"
for language in $LANGUAGES; do
echo "Checking $language"
echo "- Checking $language"
if [[ ! -f "$language.sarif" ]] ; then
echo "Missing a SARIF file for $language"
exit 1
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy