Skip to content

Merge pull request #2 from hidakatsuya/support-mysql #76

Merge pull request #2 from hidakatsuya/support-mysql

Merge pull request #2 from hidakatsuya/support-mysql #76

Workflow file for this run

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: 'sqlite3'
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.1-stable'
redmine-database: 'mysql:8.1'
ruby-version: '3.2'
expected-about-db-adapter: 'Mysql2'
expected-about-redmine-version: '5\.1\.[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 }}
- 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 }}"
working-directory: ${{ env.REDMINE_SRC }}
- run: |
bin/rails test test/unit/news_test.rb
bin/rails test test/system/my_page_test.rb
working-directory: ${{ env.REDMINE_SRC }}