-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from cat-in-136/redmine6-rails7
Support for Redmine6/rails7
- Loading branch information
Showing
20 changed files
with
239 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,21 +11,22 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
mat_env: | ||
- '3.3 redmica/[email protected]' | ||
- '3.3 redmica/[email protected]' | ||
- '3.2 redmica/[email protected]' | ||
- '3.2 redmica/[email protected]' | ||
- '3.1 redmica/[email protected]' | ||
- '3.0 redmica/[email protected]' | ||
- '2.7 redmica/[email protected]' | ||
- '3.2 redmine/[email protected]' | ||
- '3.1 redmine/[email protected]' | ||
- '3.0 redmine/[email protected]' | ||
- '3.3 redmine/[email protected]' | ||
- '3.2 redmine/[email protected]' | ||
- '3.1 redmine/[email protected]' | ||
- '3.0 redmine/[email protected]' | ||
- '2.7 redmine/[email protected]' | ||
- '2.6 redmine/[email protected]' | ||
- '2.6 redmine/[email protected]' | ||
- '2.6 redmine/[email protected]' | ||
- '2.5 redmine/[email protected]' | ||
experimental: [false] | ||
include: | ||
- mat_env: '3.2 redmica/redmica@master' | ||
- mat_env: '3.3 redmica/redmica@master' | ||
experimental: true | ||
steps: | ||
- run: | | ||
|
@@ -43,11 +44,11 @@ jobs: | |
ruby-version: ${{ env.RUBY_VERSION }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ./${{ env.PLUGIN_NAME }} | ||
- name: Set up Redmine | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.REDMINE_REPOSITORY }} | ||
ref: ${{ env.REDMINE_REF }} | ||
|
@@ -56,32 +57,31 @@ jobs: | |
- name: Copy the plugin files to plugin directory | ||
run: cp -pr ./${{ env.PLUGIN_NAME }} ./redmine/plugins/${{ env.PLUGIN_NAME }} | ||
- name: Create redmine/config/database.yml | ||
uses: DamianReeves/write-file-action@v1.2 | ||
uses: DamianReeves/write-file-action@v1.3 | ||
with: | ||
path: ./redmine/config/database.yml | ||
contents: | | ||
test: | ||
adapter: sqlite3 | ||
database: db/redmine_test.db | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ./redmine/vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('./redmine/**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
- name: uninitialized constant Nokogiri::HTML4 Issue HACK ref. https://qiita.com/Mattani/items/c4bcc95a72b69d1c0489 | ||
uses: DamianReeves/write-file-action@v1.2 | ||
- name: "'LoadError: cannot load such file -- blankslate' Issue HACK ref. https://www.redmine.org/issues/40802#note-11" | ||
uses: DamianReeves/write-file-action@v1.3 | ||
with: | ||
path: ./redmine/Gemfile.local | ||
contents: | | ||
gem 'loofah', '~> 2.20.0' | ||
if: contains(fromJSON('["2.6 redmine/[email protected]", "2.6 redmine/[email protected]", "2.5 redmine/[email protected]"]'), matrix.mat_env) | ||
gem 'builder', '~> 3.2.4' | ||
if: contains(fromJSON('["3.2 redmica/[email protected]", "3.2 redmica/[email protected]", "3.1 redmica/[email protected]", "3.0 redmica/[email protected]", "2.7 redmica/[email protected]", "2.6 redmine/[email protected]", "2.6 redmine/[email protected]", "2.5 redmine/[email protected]", "2.6 redmine/[email protected]", "2.7 redmine/[email protected]"]'), matrix.mat_env) | ||
|
||
- name: Before script | ||
run: | | ||
cd ./redmine | ||
bundle config --local path ${BUNDLE_PATH:-vendor/bundle} | ||
bundle install | ||
|
@@ -94,31 +94,27 @@ jobs: | |
# Execute plugin's migration | ||
bundle exec rake redmine:plugins NAME=${{ env.PLUGIN_NAME }} | ||
working-directory: ./redmine | ||
env: | ||
REDMINE_LANG: en | ||
RAILS_ENV: test | ||
|
||
# HACK sometimes fails login error, so retry 10 times | ||
# HACK use shell script file to avoid interruption by error | ||
- name: Prepare test script | ||
uses: DamianReeves/[email protected] | ||
with: | ||
path: ./run_test.sh | ||
contents: | | ||
#!/bin/sh | ||
cd ./redmine | ||
for i in `seq 0 9`; do | ||
# Execute plugin's test | ||
bundle exec rake redmine:plugins:test NAME=${{ env.PLUGIN_NAME }} | ||
retval=$? | ||
if [ "$retval" -eq 0 ]; then | ||
break | ||
fi | ||
echo "${i}-th test failed; Retry test..." | ||
done | ||
exit $retval | ||
- name: Execute test | ||
run: sh ./run_test.sh | ||
run: | | ||
#!/bin/sh | ||
for i in `seq 0 9`; do | ||
# Execute plugin's test | ||
bundle exec rake redmine:plugins:test NAME=${{ env.PLUGIN_NAME }} | ||
retval=$? | ||
if [ "$retval" -eq 0 ]; then | ||
break | ||
fi | ||
echo "${i}-th test failed; Retry test..." | ||
done | ||
exit $retval | ||
shell: bash {0} | ||
working-directory: ./redmine | ||
env: | ||
REDMINE_LANG: en | ||
RAILS_ENV: test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- name: heart | ||
svg: heart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.