-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (70 loc) · 2.06 KB
/
audiences-multi.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
name: audiences-multi
on:
push:
jobs:
build:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }} / ${{ matrix.gemfile }}
env:
DATABASE_USER: dbuser
DATABASE_PASS: dbpass
DATABASE_HOST: 127.0.0.1
strategy:
fail-fast: false
matrix:
ruby:
- 3.0
- 3.1
- 3.2
- 3.3
gemfile:
- gemfiles/rails_6_1.gemfile
- gemfiles/rails_7_0.gemfile
- gemfiles/rails_7_1.gemfile
exclude:
- ruby: 3.2
gemfile: gemfiles/rails_6_1.gemfile
- ruby: 3.3
gemfile: gemfiles/rails_6_1.gemfile
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: ${{ env.DATABASE_USER }}
POSTGRES_PASSWORD: ${{ env.DATABASE_PASS }}
POSTGRES_DB: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mysql:
image: mysql:latest
env:
MYSQL_USER: ${{ env.DATABASE_USER }}
MYSQL_PASSWORD: ${{ env.DATABASE_PASS }}
MYSQL_RANDOM_ROOT_PASSWORD: yes
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- name: Install non-ruby dependencies
run: sudo apt-get install libpq-dev
- name: 'postgresql adapter'
uses: powerhome/github-actions-workflows/ruby-gem@rubygem-action
env:
DATABASE_ADAPTER: postgresql
DATABASE_PORT: 5432
with:
workdir: audiences
ruby: ${{ matrix.ruby }}
gemfile: ${{ matrix.gemfile }}
- name: 'mysql2 adapter'
uses: powerhome/github-actions-workflows/ruby-gem@rubygem-action
env:
DATABASE_ADAPTER: mysql2
DATABASE_PORT: 3306
with:
workdir: audiences
ruby: ${{ matrix.ruby }}
gemfile: ${{ matrix.gemfile }}