From fc0a1b7ff236464085b9d2047460b671bacc7d37 Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sat, 24 May 2025 21:22:04 +0000 Subject: [PATCH] Merged r23792 and r23793 from trunk to 5.1-stable (#42688). git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@23795 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .github/actions/setup-redmine/action.yml | 68 ++++++++++++++++++++++ .github/workflows/tests.yml | 73 +++++++----------------- 2 files changed, 90 insertions(+), 51 deletions(-) create mode 100644 .github/actions/setup-redmine/action.yml 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 <