-
Notifications
You must be signed in to change notification settings - Fork 98
46 lines (45 loc) · 1.07 KB
/
tests.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
name: Tests
on:
pull_request:
push:
branches:
- main
schedule:
- cron: '0 0 * * 0' # weekly
jobs:
tests:
timeout-minutes: 30
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:13
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_USER: postgres
POSTGRES_DB: ci_test
POSTGRES_PASSWORD: postgres
strategy:
matrix:
include:
- RUBY_VERSION: 3.1
RAILS_VERSION: 7.0.1
- RUBY_VERSION: 2.7
RAILS_VERSION: 6.1.4.4
env:
RAILS_VERSION: ${{ matrix.RAILS_VERSION }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.RUBY_VERSION }}
bundler-cache: true
- name: Setup database
run: bundle exec rake --trace db:create db:schema:load db:seed
- name: Run tests
run: bundle exec rake spec