-
-
Notifications
You must be signed in to change notification settings - Fork 260
50 lines (50 loc) · 1.32 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
strategy:
fail-fast: false
matrix:
database: [sqlite, postgres]
services:
postgres:
image: postgres
env:
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Use postgres?
if: ${{ matrix.database == 'postgres' }}
run: echo "FORCE_POSTGRES=1" >> $GITHUB_ENV
- name: Set up Ruby
uses: ruby/[email protected]
with:
bundler-cache: true
cache-version: ${{ matrix.database }}
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '12'
cache: 'yarn'
- run: yarn install --frozen-lockfile # optional, --immutable
- name: Set up Google Chrome
uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
- run: chrome --version
- run: bin/rails db:setup
- run: bin/rake parallel:setup
- run: bin/rake