-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.35 KB
/
abstract_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
47
48
49
50
51
52
53
54
55
56
57
58
name: Abstract Tests
on: [workflow_call]
jobs:
build:
strategy:
fail-fast: false
matrix:
ruby: ['2.4', '2.5', '2.6', '2.7']
services:
postgres:
image: postgres:11.5
ports: ["5432:5432"]
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
POSTGRES_USER: runner
runs-on: ubuntu-latest
steps:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Clone current repo
uses: actions/checkout@master
with:
repository: purple-magic/tramway-core
- name: Clone dummy repo
uses: actions/checkout@master
with:
repository: purple-magic/tramway_test
branch: develop
path: spec/dummy
- name: Install PostgreSQL 11 client
run: |
sudo apt-get -yqq install libpq-dev
- name: Bundle
run: |
gem install bundler -v '2.1.2'
bundle install --jobs 4 --retry 3
- name: Setup Database
run: |
cp spec/dummy/config/database.yml.github-actions spec/dummy/config/database.yml
cd spec/dummy && bundle exec rails db:create db:migrate
env:
RAILS_ENV: test
POSTGRES_USER: runner
- name: Tests
run: |
rake