Skip to content

Commit

Permalink
Merge pull request #13 from hidakatsuya/support-redmine6
Browse files Browse the repository at this point in the history
Add support Redmine 6.0 and drop support Redmine 4.2
  • Loading branch information
hidakatsuya authored Nov 13, 2024
2 parents ee70fd9 + ea8657b commit 0707d2f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 23 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
matrix:
include:
- redmine-repository: "redmine/redmine"
redmine-version: "4.2-stable"
redmine-version: "6.0-stable"
redmine-database: "sqlite3"
ruby-version: "2.7"
ruby-version: "3.3"
expected-about-db-adapter: "SQLite"
expected-about-redmine-version: '4\.2\.[0-9]\+\.stable'
expected-about-redmine-version: '6\.0\.[0-9]\+\.stable'

- redmine-repository: "redmine/redmine"
redmine-version: "5.1-stable"
Expand All @@ -35,13 +35,6 @@ jobs:
expected-about-db-adapter: "Mysql2"
expected-about-redmine-version: '5\.1\.[0-9]\+\.stable'

- redmine-repository: "redmica/redmica"
redmine-version: "stable-2.0"
redmine-database: "postgres:10"
ruby-version: "2.7"
expected-about-db-adapter: "PostgreSQL"
expected-about-redmine-version: '2\.0\.[0-9]\+\.stable'

- redmine-repository: "redmica/redmica"
redmine-version: "stable-3.0"
redmine-database: "postgres:14"
Expand Down Expand Up @@ -84,8 +77,7 @@ jobs:
run: bin/rails test test/unit/news_test.rb
working-directory: ${{ env.REDMINE_SRC }}

- name: Run system test if Redmine >= 5.0
if: ${{ env.REDMINE_VERSION_MAJOR >= 5 }}
- name: Run system test
run: bin/rails test test/system/my_page_test.rb
working-directory: ${{ env.REDMINE_SRC }}

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ See also [action.yml](./action.yml).
## Supported Redmine version
v4.2 or later
v5.0 or later
## Example
Expand All @@ -39,10 +39,10 @@ v4.2 or later
```yaml
- uses: hidakatsuya/action-setup-redmine@v1
with:
repository: 'redmica/redmica'
version: 'v2.4.2'
repository: 'redmine/redmine'
version: 'v6.0.1'
database: 'postgres:14'
ruby-version: '3.2'
ruby-version: '3.3'
```
### Run a test for the Redmine plugin
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ runs:
fi
shell: bash
env:
MINIUMUM_SUPPORTED_REDMINE_VERSION: "402" # v4.2.x
MINIUMUM_SUPPORTED_REDMINE_VERSION: "500" # v5.0.0

- name: Set up base environment
run: $GITHUB_ACTION_PATH/scripts/setup-base.sh
Expand Down
4 changes: 0 additions & 4 deletions scripts/setup-base-4.2.sh → scripts/setup-base-6.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,3 @@ echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sud
sudo apt-get update
sudo apt-get install -y --no-install-recommends google-chrome-stable
echo GOOGLE_CHROME_OPTS_ARGS="headless,disable-gpu,no-sandbox,disable-dev-shm-usage" >> $GITHUB_ENV

# Fix LoadError cannot load such file -- builder
# https://www.redmine.org/issues/40802
echo "gem 'builder', '~> 3.2.4'" >> $REDMINE_DIR/Gemfile.local
4 changes: 2 additions & 2 deletions scripts/setup-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ set -eu
major_version_with_branch=$REDMINE_VERSION_MAJOR.$REDMINE_VERSION_MINOR.$REDMINE_VERSION_BRANCH

case $major_version_with_branch in
5.1.devel)
6.0.devel)
setup_version="next";;
5.1*|5.0*|4.2*)
6.0*|5.1*|5.0*)
setup_version="$REDMINE_VERSION_MAJOR.$REDMINE_VERSION_MINOR";;
*)
setup_version="next";;
Expand Down

0 comments on commit 0707d2f

Please sign in to comment.