-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
44 lines (35 loc) · 881 Bytes
/
.gitlab-ci.yml
File metadata and controls
44 lines (35 loc) · 881 Bytes
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
.test_template: &test_definition
image: ruby:2.6.5-stretch
tags:
- yale
services:
- postgres:latest
variables:
POSTGRES_DB: gitlab_ci_test
POSTGRES_USER: runner
POSTGRES_HOST_AUTH_METHOD: trust
stage: test
before_script:
- apt-get update -q
- curl -sL https://deb.nodesource.com/setup_10.x | bash - && apt-get install -y nodejs
- ruby -v
- which ruby
- gem install bundler --no-document
- bundle install -j $(nproc) --path vendor/ruby
- cp config/database.yml.gitlab config/database.yml
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- vendor/ruby
spec:
<<: *test_definition
script:
- bundle exec rspec
style:
<<: *test_definition
script:
- bundle exec rake check_style 'git diff origin/master --name-status'
audit:
<<: *test_definition
script:
- bundle exec rake bundler:audit