Skip to content

Commit

Permalink
Merge pull request #11 from hidakatsuya/dev/improve-code
Browse files Browse the repository at this point in the history
Test against RedMica 3.0 and Ruby 3.3, and code improvements
  • Loading branch information
hidakatsuya authored Jul 14, 2024
2 parents 44459ce + 1ceb86e commit 5896ac0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ jobs:
expected-about-redmine-version: '2\.0\.[0-9]\+\.stable'

- redmine-repository: "redmica/redmica"
redmine-version: "stable-2.4"
redmine-version: "stable-3.0"
redmine-database: "postgres:14"
ruby-version: "3.2"
ruby-version: "3.3"
expected-about-db-adapter: "PostgreSQL"
expected-about-redmine-version: '2\.4\.[0-9]\+\.stable'
expected-about-redmine-version: '3\.0\.[0-9]\+\.stable'

steps:
- uses: actions/checkout@v4
Expand Down
16 changes: 1 addition & 15 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,7 @@ runs:
MINIUMUM_SUPPORTED_REDMINE_VERSION: "402" # v4.2.x

- name: Set up base environment
run: |
major_version_with_branch=$REDMINE_VERSION_MAJOR.$REDMINE_VERSION_MINOR.$REDMINE_VERSION_BRANCH
case $major_version_with_branch in
5.1.devel)
setup_version="next";;
5.1*|5.0*|4.2*)
setup_version="$REDMINE_VERSION_MAJOR.$REDMINE_VERSION_MINOR";;
*)
setup_version="next";;
esac
echo "Running scripts/setup-base-$setup_version.sh for Redmine $REDMINE_VERSION ..."
./scripts/setup-base-$setup_version.sh
run: ./scripts/setup-base.sh
shell: bash
env:
REDMINE_DIR: ${{ inputs.path }}
Expand Down
19 changes: 19 additions & 0 deletions scripts/setup-base.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -eu

# v5.1.3.stable -> 5.1.stable
major_version_with_branch=$REDMINE_VERSION_MAJOR.$REDMINE_VERSION_MINOR.$REDMINE_VERSION_BRANCH

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

echo "Running scripts/setup-base-$setup_version.sh for Redmine $REDMINE_VERSION ..."

./scripts/setup-base-$setup_version.sh

0 comments on commit 5896ac0

Please sign in to comment.