forked from danecjensen/jumpstart-pro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
46 lines (42 loc) · 1.22 KB
/
.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
41
42
43
44
45
46
image: "ruby:3.0"
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:
- echo fs.inotify.max_user_watches=524288 | tee -a /etc/sysctl.conf && sysctl -p
- curl -sL https://deb.nodesource.com/setup_lts.x | bash -
- 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 config path vendor
- bundle install --jobs $(nproc) "${FLAGS[@]}"
- yarn install
- bundle exec rails test:prepare
- bundle exec rails db:test:prepare
test:
stage: test
cache:
paths:
- node_modules/
- .yarn
- vendor
script:
- bundle exec standardrb
# Uncomment to enable Brakeman checks in CI
# - bundle exec brakeman
- bundle exec rails test
only:
- master
- merge_requests