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

CircleCI: Add a workflow to check if issue_templates.js is up to date #114

Merged
merged 1 commit into from
Oct 30, 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
28 changes: 28 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,29 @@ jobs:
sed -i 's/gem "selenium-webdriver".*/gem "selenium-webdriver", ">= 3.4.0"/' Gemfile
- redmine-plugin/bundle-install
- redmine-plugin/rspec
check-asset-js:
docker:
- image: cimg/node:18.16.0
steps:
- checkout
- run:
name: Install dependencies
command: npm ci
- run:
name: Rebuild the assets/javascripts/issue_templates.js
command: npm run build
- run:
name: Compare the expected and actual assets/javascripts/issue_templates.js
command: |
if [ "$(git diff --ignore-space-at-eol assets/javascripts/ | wc -l)" -gt "0" ]; then
message="assets/javascripts/issue_templates.js is out of date. Please build and push again according to the \"Build scripts\" section in README.md."
echo $message

# Also add the message to the GitHub step summary
echo "## :x: assets/javascripts/issue_templates.js is out of date" >> $GITHUB_STEP_SUMMARY
echo $message >> $GITHUB_STEP_SUMMARY
exit 1
fi

default_context: &default_context
context:
Expand All @@ -98,29 +121,34 @@ default_context: &default_context
workflows:
run-tests-workflow:
jobs:
- check-asset-js
- run-tests:
<<: *default_context
name: test on supported maximum versions with PostgreSQL
redmine_version: $REDMINE_MAX_VERSION
ruby_version: $RUBY_MAX_VERSION
database: pg
requires: [check-asset-js]
- run-tests:
<<: *default_context
name: test on supported minimum versions with MySQL
redmine_version: $REDMINE_MIN_VERSION
ruby_version: $RUBY_MIN_VERSION
database: mysql
requires: [check-asset-js]
- rspec:
<<: *default_context
name: RSpec on supported maximum versions with PostgreSQL
redmine_version: $REDMINE_MAX_VERSION
ruby_version: $RUBY_MAX_VERSION
db: pg
db_version: $POSTGRES_VERSION
requires: [check-asset-js]
- rspec:
<<: *default_context
name: RSpec on supported minimum versions with MySQL
redmine_version: $REDMINE_MIN_VERSION
ruby_version: $RUBY_MIN_VERSION
db: mysql
db_version: $MYSQL_VERSION
requires: [check-asset-js]