Skip to content

Commit

Permalink
check-asset-js on CircleCI (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
naopontan authored Oct 30, 2024
1 parent b4f6722 commit 817849f
Showing 1 changed file with 28 additions and 0 deletions.
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]

0 comments on commit 817849f

Please sign in to comment.