-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (62 loc) · 2.2 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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 }}
- 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 }}