-
Notifications
You must be signed in to change notification settings - Fork 7
82 lines (80 loc) · 2.11 KB
/
rspec.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
75
76
77
78
79
80
81
82
name: Build
on:
push:
branches:
- master
pull_request:
jobs:
rspec:
runs-on: ubuntu-latest
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
POSTGRES_URL: postgres://postgres:postgres@localhost:5432
MYSQL_URL: mysql2://rails:rails@127.0.0.1:3306
DB: ${{ matrix.db }}
DB_NAME: slotted_counters_test
CI: true
strategy:
fail-fast: false
matrix:
ruby: ["3.0"]
gemfile: ["gemfiles/rails7.gemfile"]
db: ["mysql"]
include:
- ruby: "2.7"
gemfile: "gemfiles/rails6.gemfile"
db: "postgres"
- ruby: "3.1"
gemfile: "gemfiles/railsmaster.gemfile"
db: "postgres"
- ruby: "3.0"
gemfile: "gemfiles/rails7.gemfile"
db: "postgres"
- ruby: "2.7"
gemfile: "gemfiles/rails6.gemfile"
db: "mysql"
- ruby: "3.1"
gemfile: "gemfiles/railsmaster.gemfile"
db: "mysql"
services:
postgres:
image: postgres:14
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
mysql:
image: mysql:8
ports: [ "3306:3306" ]
env:
MYSQL_PASSWORD: rails
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: slotted_counters_test
MYSQL_USER: rails
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get -yqq install libpq-dev
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Create DB
run: |
env PGPASSWORD=postgres createdb -h localhost -U postgres slotted_counters_test
- name: Run RSpec
run: |
bundle exec rspec -f d --force-color