Test against Redmine 4.2 and 5.0 #86
Workflow file for this run
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
name: Build | |
on: | |
push: | |
branches: | |
- main | |
- dev/** | |
paths-ignore: | |
- '*.md' | |
pull_request: | |
env: | |
REDMINE_SRC: redmine-src | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: ${{ matrix.redmine-repository }} ${{ matrix.redmine-version }} ${{ matrix.redmine-database }} | |
strategy: | |
matrix: | |
include: | |
- redmine-repository: 'redmine/redmine' | |
redmine-version: '5.1-stable' | |
redmine-database: 'mysql:8.1' | |
ruby-version: '3.2' | |
expected-about-db-adapter: 'SQLite' | |
expected-about-redmine-version: '5\.1\.[0-9]\.stable' | |
- redmine-repository: 'redmine/redmine' | |
redmine-version: '5.0-stable' | |
redmine-database: 'sqlite3' | |
ruby-version: '3.1' | |
expected-about-db-adapter: 'SQLite' | |
expected-about-redmine-version: '5\.1\.[0-9]\.stable' | |
- redmine-repository: 'redmine/redmine' | |
redmine-version: '4.2-stable' | |
redmine-database: 'sqlite3' | |
ruby-version: '2.7' | |
expected-about-db-adapter: 'SQLite' | |
expected-about-redmine-version: '4\.2\.[0-9]\.stable' | |
- redmine-repository: 'redmica/redmica' | |
redmine-version: 'stable-2.4' | |
redmine-database: 'postgres:14' | |
ruby-version: '3.2' | |
expected-about-db-adapter: 'PostgreSQL' | |
expected-about-redmine-version: '2\.4\.[0-9]\.stable' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./ | |
with: | |
path: ${{ env.REDMINE_SRC }} | |
repository: ${{ matrix.redmine-repository }} | |
version: ${{ matrix.redmine-version }} | |
database: ${{ matrix.redmine-database }} | |
ruby-version: ${{ matrix.ruby-version }} | |
- name: Install a plugin for testing | |
run: | | |
cp -R ../.github/hello_world plugins/ | |
bin/rails redmine:plugins:migrate | |
working-directory: ${{ env.REDMINE_SRC }} | |
- run: | | |
about=$(bin/rails r "require 'redmine/version'; puts Redmine::Info.environment") | |
echo "$about" | |
echo "$about" | grep "${{ matrix.expected-about-db-adapter }}" | |
echo "$about" | grep "${{ matrix.expected-about-redmine-version }}" | |
echo "$about" | grep "hello_world" | |
working-directory: ${{ env.REDMINE_SRC }} | |
- run: | | |
bin/rails test test/unit/news_test.rb | |
bin/rails test test/system/my_page_test.rb | |
bin/rails redmine:plugins:test | |
working-directory: ${{ env.REDMINE_SRC }} |