-
Notifications
You must be signed in to change notification settings - Fork 7
62 lines (50 loc) · 1.44 KB
/
test.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
name: Test
on: [push]
jobs:
rspec:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
DATABASE_URL: "postgresql://root@localhost/adventure-time_test?pool=5"
TZ: "/usr/share/zoneinfo/America/New_York"
COV: '1'
BUNDLER_PATH: vendor/bundle
BUNDLER_JOBS: 4
YARN_CACHE_FOLDER: ~/.cache/yarn
services:
postgres:
image: postgres:10.1-alpine
env:
POSTGRES_USER: root
POSTGRES_DB: adventure-time_test
POSTGRES_PASSWORD: ""
ports:
- 5432:5432
# Add a health check
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up ruby 2.5.1
uses: ruby/setup-ruby@v1
- name: Set up Ruby dependencies
run: |
gem update bundler
bundle install
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14.17.0'
cache: 'yarn'
- run: node --version
- run: yarn --version
- name: Install js dependencies
run: |
yarn install --pure-lockfile
- name: Database setup
run: bundle exec rake db:migrate --trace
- name: Install Chromedriver
run: |
npx @puppeteer/browsers install chrome@stable
- name: Run specs
run: bundle exec rspec