forked from stefansenk/spree_multi_tenant
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (44 loc) · 1.27 KB
/
main.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
name: Build and test
on: push
jobs:
build:
runs-on: ubuntu-latest
services:
db:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports: ["5432:5432"]
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 15
env:
PGHOST: 127.0.0.1
PGUSER: postgres
PGPASSWORD: postgres
RAILS_ENV: test
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Use Node.js ${{ steps.nvm.outputs.NVMRC }}
uses: actions/setup-node@v1
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
- name: Install PostgreSQL client library libpq-dev
run: |
sudo apt-get -yqq install libpq-dev
- name: Setup ruby and bundle install
uses: ruby/setup-ruby@v1
with: # Gets version from .ruby-version
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Create dummy app for tests
run: |
bundle exec rake test_app
- name: Test with Rspec
run: |
bundle exec rspec