-
Notifications
You must be signed in to change notification settings - Fork 28
39 lines (39 loc) · 917 Bytes
/
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
name: Ruby
on: [push,pull_request]
jobs:
spec:
runs-on: ubuntu-latest
name: Run test
services:
postgres:
image: circleci/postgres:10.6-alpine
ports: ["5432:5432"]
env:
POSTGRES_USER: postgres
POSTGRES_DB: dmemo_test
mysql:
image: circleci/mysql:5.6
ports: ["3306:3306"]
env:
MYSQL_DATABASE: dmemo_test
env:
PG_HOST: localhost
RAILS_ENV: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: Setup DB
run: bin/rails db:create ridgepole:apply
- name: Setup npm packages
run: npm install
- name: Compile assets
run: npm run webpack
- name: Run rspec
run: bin/rspec