diff --git a/.github/actions/setup-redmine/action.yml b/.github/actions/setup-redmine/action.yml
new file mode 100644
index 000000000..d637914f0
--- /dev/null
+++ b/.github/actions/setup-redmine/action.yml
@@ -0,0 +1,68 @@
+name: Setup Redmine Test Environment
+description: Composite action for setting up Redmine test environment
+
+inputs:
+ db-type:
+ description: 'Database type: postgresql, mysql2, or sqlite3. Note: postgresql and mysql2 require service containers to be defined in the workflow.'
+ required: true
+ ruby-version:
+ description: 'Ruby version to use'
+ required: true
+
+runs:
+ using: composite
+ steps:
+ - name: Install dependencies and configure environment
+ shell: bash
+ run: |
+ sudo apt-get update
+ sudo apt-get install --yes --quiet ghostscript gsfonts locales bzr cvs
+ sudo locale-gen en_US # for bazaar non ascii test
+
+ - name: Allow imagemagick to read PDF files
+ shell: bash
+ run: |
+ echo '' > policy.xml
+ echo '' >> policy.xml
+ echo '' >> policy.xml
+ sudo rm /etc/ImageMagick-6/policy.xml
+ sudo mv policy.xml /etc/ImageMagick-6/policy.xml
+
+ - if: ${{ inputs.db-type == 'sqlite3' }}
+ name: Prepare test database for sqlite3
+ shell: bash
+ run: |
+ cat > config/database.yml < config/database.yml <' > policy.xml
- echo '' >> policy.xml
- echo '' >> policy.xml
- sudo rm /etc/ImageMagick-6/policy.xml
- sudo mv policy.xml /etc/ImageMagick-6/policy.xml
-
- - if: ${{ matrix.db == 'sqlite3' }}
- name: Prepare test database for sqlite3
- run: |
- cat > config/database.yml < config/database.yml <