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

Fix: integrated imagemagick into github workflow and resolved build failure #6121

Merged
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
28 changes: 27 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -18,6 +18,32 @@ jobs:
with:
pandoc-version: '2.9.2.1'

- name: install ImageMagick
uses: mfinelli/setup-imagemagick@v6
with:
cache: true

# Cache ImageMagick binaries
- name: Cache Latest ImageMagick
uses: actions/cache@v3
with:
path: /home/runner/bin/magick
key: ${{ runner.os }}-imagemagick-latest
restore-keys: |
${{ runner.os }}-imagemagick-latest
# Update PATH for ImageMagick
- name: Update PATH for ImageMagick
run: echo "/home/runner/bin" >> $GITHUB_PATH

- name: Create symlink for identify and convert
run: |
for cmd in identify convert; do
if ! [ -x "$(command -v $cmd)" ]; then
sudo ln -s $(which magick) /usr/bin/$cmd
fi
done
- name: setup Redis
uses: supercharge/[email protected]

@@ -91,4 +117,4 @@ jobs:
if-no-files-found: ignore

- name: Ruby linting
run: bundle exec rubocop
run: bundle exec rubocop
2 changes: 2 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
@@ -54,6 +54,8 @@ def dump_js_coverage
# Settings specified here will take
# precedence over those in config/application.rb.

Paperclip.options[:command_path] = "/usr/bin"

# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped

Unchanged files with check annotations Beta

export const TitleOpener = ({ showArticle, showButtonClass, showButtonLabel, title }) => (
<div className={`tooltip-trigger ${showButtonClass || ''}`}>
<button style={{ textAlign: 'left' }} onClick={showArticle} aria-describedby="icon-article-viewer-desc">{title}</button>
<p id="icon-article-viewer-desc">Open Article Viewer</p>

Check warning on line 7 in app/assets/javascripts/components/common/ArticleViewer/components/TitleOpener.jsx

GitHub Actions / build

Use I18n over string literals for localization: <p id="icon-article-viewer-desc">Open Article Viewer</p>
<div className="tooltip tooltip-title dark large">
<p>{showButtonLabel()}</p>
</div>

Check warning on line 10 in app/assets/javascripts/components/common/AssignmentLinks/AllPeerReviewLinks.jsx

GitHub Actions / build

Use I18n over string literals for localization: <span key="title">Reviews: </span>
let requestedAccountsLink;
if (!Features.wikiEd) {
const massEnrollmentUrl = `/mass_enrollment/${course.slug}`;
massEnrollmentLink = <p><a href={massEnrollmentUrl}>Add multiple users at once.</a></p>;

Check warning on line 132 in app/assets/javascripts/components/common/enroll_button.jsx

GitHub Actions / build

Use I18n over string literals for localization: <a href={massEnrollmentUrl}>Add multiple users at once.</a>
}
if (!Features.wikiEd) {
const requestedAccountsUrl = `/requested_accounts/${course.slug}`;
let button;
if (isVisible) {
button = <button onClick={hide} className="button dark small">Okay</button>;

Check warning on line 41 in app/assets/javascripts/components/common/final_article_checklist.jsx

GitHub Actions / build

Use I18n over string literals for localization: <button onClick={hide} className="button dark small">Okay</button>
} else {
button = <a onClick={show} className="button dark small">Quality checklist</a>;

Check warning on line 43 in app/assets/javascripts/components/common/final_article_checklist.jsx

GitHub Actions / build

Use I18n over string literals for localization: <a onClick={show} className="button dark small">Quality checklist</a>
}
let modal;
} else {
modal = (
<div ref={ref} className="article-viewer my-assignment-checklist">
<h2>Final review checklist</h2>

Check warning on line 52 in app/assets/javascripts/components/common/final_article_checklist.jsx

GitHub Actions / build

Use I18n over string literals for localization: <h2>Final review checklist</h2>
<p>
As you polish up your completed article, review each of these items and fix any problems you find.
</p>
const wikipediaHelpUser = this.wikipediaHelpUser();
wikipediaHelpButton = (
<span className="contact-wikipedia-help" key={`${wikipediaHelpUser.username}-wikipedia-help`}>
<a href="#" className="wikipedia-help-link button dark small stacked" onClick={e => this.updateTargetUser(wikipediaHelpUser, e)}>question about editing Wikipedia</a>

Check warning on line 114 in app/assets/javascripts/components/common/get_help_button.jsx

GitHub Actions / build

Use I18n over string literals for localization: <a href="#" className="wikipedia-help-link button dark small stacked" onClick={e => this.updateTargetUser(wikipediaHelpUser, e)}>question about editing Wikipedia</a>
<br />
</span>
);
const programHelpUser = this.programHelpUser();
programHelpButton = (
<span className="contact-program-help" key={`${programHelpUser.username}-program-help`}>
<a href="#" className="program-help-link button dark stacked small" onClick={e => this.updateTargetUser(programHelpUser, e)}>question about Wiki Ed or your assignment</a>

Check warning on line 124 in app/assets/javascripts/components/common/get_help_button.jsx

GitHub Actions / build

Use I18n over string literals for localization: <a href="#" className="program-help-link button dark stacked small" onClick={e => this.updateTargetUser(programHelpUser, e)}>question about Wiki Ed or your assignment</a>
<br />
</span>
);
const dashboardHelpUser = this.dashboardHelpUser();
dashboardHelpButton = (
<span className="contact-dashboard-help" key={`${dashboardHelpUser.username}-dashboard-help`}>
<a href="#" className="dashboard-help-link button dark stacked small" onClick={e => this.updateTargetUser(dashboardHelpUser, e)}>question about the dashboard</a>

Check warning on line 134 in app/assets/javascripts/components/common/get_help_button.jsx

GitHub Actions / build

Use I18n over string literals for localization: <a href="#" className="dashboard-help-link button dark stacked small" onClick={e => this.updateTargetUser(dashboardHelpUser, e)}>question about the dashboard</a>
<br />
</span>
);
let button;
if (isVisible) {
button = <button onClick={hide} className="button dark small">Okay</button>;

Check warning on line 20 in app/assets/javascripts/components/common/mainspace_checklist.jsx

GitHub Actions / build

Use I18n over string literals for localization: <button onClick={hide} className="button dark small">Okay</button>
} else {
button = <a onClick={show} className="button dark small">Quality checklist</a>;
}