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

ci(integration): add a step to archive core eval scripts #9929

Merged
merged 6 commits into from
Aug 22, 2024
Merged
Changes from 3 commits
Commits
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
20 changes: 20 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,26 @@ jobs:
- name: build proposals tests
run: yarn build
working-directory: a3p-integration
- name: zip up all core proposals
run: |
find . -type d -path "./a3p-integration/proposals/*/submission" | while read -r dir; do
LuqiPan marked this conversation as resolved.
Show resolved Hide resolved
parent_dir=$(basename "$(dirname "$dir")")

sanitized_parent_dir=${parent_dir//:/-}

zip_file="${sanitized_parent_dir}.zip"

zip -r "$zip_file" "$dir"

echo "Zipped $dir into $zip_file"
done
- name: archive core proposals
turadg marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/upload-artifact@v4
LuqiPan marked this conversation as resolved.
Show resolved Hide resolved
with:
name: core-proposals
path: ./*.zip
Copy link
Member

Choose a reason for hiding this comment

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

why zip instead of uploading the dirs?

    path: ./a3p-integration/proposals/*/submission

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because upload-artifact action doesn't like it when there's : in the path, we have b:upgrade-next in the path which would prevent the action from uploading. So I opted to zip while replacing the : with - instead of renaming the directories

Copy link
Member

Choose a reason for hiding this comment

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

Ah. Please document that in a comment on the zipping step

Copy link
Member

Choose a reason for hiding this comment

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

Alternately, it would be less code and perhaps a better debugging experience if instead of zipping the submissions were copied to a /tmp folder and this step uploaded from there. (copy with rename of parent path)

- name: remove all zip files after they're archived
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is required to pass the git tree dirty check later on in this workflow

Copy link
Member

Choose a reason for hiding this comment

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

could you create the zips in a path outside the repo? e.g. /tmp/proposal-zips

Copy link
Member

Choose a reason for hiding this comment

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

or in the repo but under a .gitignored path. e.g. build. That should avoid the dirty check.

We shouldn't need another step for cleanup

run: rm -f *.zip
- name: run proposals tests
run: yarn test
working-directory: a3p-integration
Expand Down
Loading