forked from nationalfevertracker/national-fever-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
40 lines (35 loc) · 952 Bytes
/
.gitlab-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
image: "ruby:2.7"
services:
- postgres
variables:
RAILS_ENV: test
POSTGRES_DB: jumpstart_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "password"
DATABASE_URL: "postgresql://postgres:password@postgres:5432/jumpstart_test"
before_script:
- apt-get update -qq && apt-get install -y -qq nodejs
# Install yarn as outlined in (https://yarnpkg.com/lang/en/docs/install/#alternatives-stable)
- curl -o- -L https://yarnpkg.com/install.sh | bash
# Make available in the current terminal
- export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
- node -v
- yarn -v
- ruby -v
- which ruby
- gem install bundler --no-document
- bundle install --jobs $(nproc) "${FLAGS[@]}" --path /cache
- yarn install
# Database setup
- bin/rails db:setup
test:
stage: test
cache:
paths:
- node_modules/
- .yarn
script:
- bundle exec rails test
only:
- master
- merge_requests