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

Archive all_react_app_exports.js #51

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Changes from all 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
6 changes: 6 additions & 0 deletions .github/workflows/foreman_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ jobs:
if: ${{ hashFiles(format('{0}/package.json', inputs.plugin), format('{0}/test/integration/**', inputs.plugin)) != '' && contains(matrix.task, 'test') }}
run:
bundle exec rake webpack:compile
- name: Archive all_react_app_exports
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- name: Archive all_react_app_exports
- name: Archive all_react_app_exports
if: ${{ hashFiles(format('{0}/package.json', inputs.plugin), format('{0}/test/integration/**', inputs.plugin)) != '' && contains(matrix.task, 'test') }}

That way it will only execute for the branches where we actually compiled webpack and the file exists (otherwise you get ugly warnings in the logs)

Copy link
Member Author

Choose a reason for hiding this comment

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

Isnt it an error if webpack compiled and the file doesnt exist?

Copy link
Member

Choose a reason for hiding this comment

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

For Foreman? Sure.
But this is the plugin test file, and for plugins that do not have own webpack content, we don't even compile Foremans webpack in CI to save time.

We should add the same archival step in https://github.com/theforeman/foreman/blob/develop/.github/workflows/foreman.yml (and debate whether it should be a fail or not there)

Copy link
Member Author

Choose a reason for hiding this comment

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

if: ${{ hashFiles(format('{0}/package.json', inputs.plugin), format('{0}/test/integration/**', inputs.plugin)) != '' && contains(matrix.task, 'test') }}
uses: actions/upload-artifact@v4
with:
name: all_react_app_exports-${{ env.ARTIFACT_SUFFIX }}.js
path: webpack/assets/javascripts/all_react_app_exports.js
- name: Add nulldb DB schema
run: cp -f db/schema.rb.nulldb db/schema.rb
if: ${{ contains(matrix.task, 'nulldb') }}
Expand Down