-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate setup script for each major version #9
Merged
hidakatsuya
merged 4 commits into
main
from
separate-setup-script-for-each-major-version
Jul 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1c5322c
Separate the setup of MySQL, PostgreSQL, and SQLite3 into individual …
hidakatsuya 3cf79f7
Format code to use double quote
hidakatsuya 7fafb9c
Separate setup scripts for the base environment for each major version
hidakatsuya cc67d2d
Support only the version that the Redmine community supports
hidakatsuya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -51,32 +51,25 @@ runs: | |
env: | ||
REDMINE_DIR: ${{ inputs.path }} | ||
|
||
- name: Install dependencies | ||
- name: Set up base environment | ||
run: | | ||
sudo apt-get update; \ | ||
sudo apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
bzr git mercurial subversion cvs \ | ||
ghostscript \ | ||
gsfonts \ | ||
imagemagick libmagick++-dev \ | ||
libnss3-dev; | ||
shell: bash | ||
major_version_with_branch=$REDMINE_VERSION_MAJOR.$REDMINE_VERSION_MINOR.$REDMINE_VERSION_BRANCH | ||
|
||
- name: Allow ImageMagick to read PDF files | ||
run: | | ||
sudo sed -ri 's/(rights)="none" (pattern="PDF")/\1="read" \2/' /etc/ImageMagick-6/policy.xml | ||
shell: bash | ||
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 | ||
|
||
- name: Set up Google Chrome for system tests | ||
run: | | ||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list | ||
sudo apt-get update | ||
sudo apt-get install -y --no-install-recommends google-chrome-stable | ||
echo "Running scripts/setup-base-$setup_version.sh for Redmine $REDMINE_VERSION ..." | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will output like below:
https://github.com/hidakatsuya/action-setup-redmine/actions/runs/9920802272/job/27408068744 |
||
|
||
echo GOOGLE_CHROME_OPTS_ARGS="headless,disable-gpu,no-sandbox,disable-dev-shm-usage" >> $GITHUB_ENV | ||
./scripts/setup-base-$setup_version.sh | ||
shell: bash | ||
env: | ||
REDMINE_DIR: ${{ inputs.path }} | ||
|
||
- name: Set up PostgreSQL database | ||
if: ${{ startsWith(inputs.database, 'postgres:') }} | ||
|
@@ -101,13 +94,6 @@ runs: | |
env: | ||
REDMINE_DIR: ${{ inputs.path }} | ||
|
||
# https://www.redmine.org/issues/40802 | ||
- name: Fix LoadError in Redmine 4.2 | ||
if: ${{ env.REDMINE_VERSION_MAJOR < 5 }} | ||
run: echo "gem 'builder', '~> 3.2.4'" >> Gemfile.local | ||
shell: bash | ||
working-directory: ${{ inputs.path }} | ||
|
||
- name: Set up Ruby and install dependencies | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
|
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,27 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
# Install dependencies | ||
sudo apt-get update; \ | ||
sudo apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
bzr git mercurial subversion cvs \ | ||
ghostscript \ | ||
gsfonts \ | ||
imagemagick libmagick++-dev \ | ||
libnss3-dev; | ||
|
||
# Allow ImageMagick to read PDF files | ||
sudo sed -ri 's/(rights)="none" (pattern="PDF")/\1="read" \2/' /etc/ImageMagick-6/policy.xml | ||
|
||
# Set up Google Chrome for system tests | ||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list | ||
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 |
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,23 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
# Install dependencies | ||
sudo apt-get update; \ | ||
sudo apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
bzr git mercurial subversion cvs \ | ||
ghostscript \ | ||
gsfonts \ | ||
imagemagick libmagick++-dev \ | ||
libnss3-dev; | ||
|
||
# Allow ImageMagick to read PDF files | ||
sudo sed -ri 's/(rights)="none" (pattern="PDF")/\1="read" \2/' /etc/ImageMagick-6/policy.xml | ||
|
||
# Set up Google Chrome for system tests | ||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list | ||
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 |
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,23 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
# Install dependencies | ||
sudo apt-get update; \ | ||
sudo apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
bzr git mercurial subversion cvs \ | ||
ghostscript \ | ||
gsfonts \ | ||
imagemagick libmagick++-dev \ | ||
libnss3-dev; | ||
|
||
# Allow ImageMagick to read PDF files | ||
sudo sed -ri 's/(rights)="none" (pattern="PDF")/\1="read" \2/' /etc/ImageMagick-6/policy.xml | ||
|
||
# Set up Google Chrome for system tests | ||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list | ||
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 |
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,23 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
# Install dependencies | ||
sudo apt-get update; \ | ||
sudo apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
bzr git mercurial subversion cvs \ | ||
ghostscript \ | ||
gsfonts \ | ||
imagemagick libmagick++-dev \ | ||
libnss3-dev; | ||
|
||
# Allow ImageMagick to read PDF files | ||
sudo sed -ri 's/(rights)="none" (pattern="PDF")/\1="read" \2/' /etc/ImageMagick-6/policy.xml | ||
|
||
# Set up Google Chrome for system tests | ||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list | ||
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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, when the version is 6.0.0,
setup-base-next.sh
will be executed.