Skip to content

Commit

Permalink
Run system tests when the version is also v4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hidakatsuya committed Jul 13, 2024
1 parent 6757c05 commit 73f9f44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,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
18 changes: 11 additions & 7 deletions scripts/setup-base-4.2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@ sudo apt-get install -y --no-install-recommends \
# 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

# Set up Google Chrome for system tests
echo GOOGLE_CHROME_OPTS_ARGS="headless,disable-gpu,no-sandbox,disable-dev-shm-usage" >> $GITHUB_ENV
sed -i -e '/gem "selenium-webdriver"/d' $REDMINE_DIR/Gemfile
sed -i -e "/gem 'webdrivers'/d" $REDMINE_DIR/Gemfile
echo "gem 'selenium-webdriver', '~> 4.8.6'" >> $REDMINE_DIR/Gemfile
echo "gem 'webdrivers', '~> 5.2', require: false" >> $REDMINE_DIR/Gemfile

sed -i -e "/options: options/d" $REDMINE_DIR/test/application_system_test_case.rb

cat $REDMINE_DIR/Gemfile

0 comments on commit 73f9f44

Please sign in to comment.