-
Notifications
You must be signed in to change notification settings - Fork 2
/
.sun-ci.yml
38 lines (38 loc) · 1.22 KB
/
.sun-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
workspace: true
stages:
- build
- test
jobs:
- name: build:prepare
stage: build
image: sunci/ruby:3.2.2
script:
- cp database-ci.yml config/database.yml
- bundle _2.1.4_ install --path vendor/bundle # 2.1.4 if ruby 2.7.1 or 3.0.2
cache:
- key: vendor_$CI_BRANCH
paths:
- vendor/bundle
# - name: test:rspec
# stage: test
# image: sunci/ruby:3.2.2
# services:
# - image: mysql:5.7.22
# name: mysql-test
# environment:
# MYSQL_DATABASE: db-test
# MYSQL_USER: user-test
# MYSQL_PASSWORD: password-test
# MYSQL_ROOT_PASSWORD: password-test
# before_script:
# - bundle 2.1.4 install --path vendor/bundle # 2.1.4 if ruby 2.7.1 or 3.0.2
# script:
# - RAILS_ENV=test bundle exec rails db:drop db:create db:migrate
# - bundle 2.1.4 exec rspec # 2.1.4 if ruby 2.7.1 or 3.0.2
- name: test:rubocop
stage: test
image: sunci/ruby:3.2.2
before_script:
- bundle _2.1.4_ install --path vendor/bundle # 2.1.4 if ruby 2.7.1 or 3.0.2
script:
- bundle exec rubocop --require rubocop/formatter/checkstyle_formatter --format RuboCop::Formatter::CheckstyleFormatter --no-color app/ lib/