-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.sun-ci.yml
51 lines (47 loc) · 1.31 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
39
40
41
42
43
44
45
46
47
48
49
50
51
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
# - bundle _2.1.4_ exec rake db:drop db:create db:migrate
# - mkdir .sun-ci
# script:
# - DISABLE_SPRING=1 bundle _2.1.4_ exec rspec --format html --out .sun-ci/rspec.html spec/ # _2.1.4_ if ruby 2.7.1 or 3.0.2
# only:
# branches:
# - master
# artifacts:
# name: rspec_report
# paths:
# - .sun-ci
# expires_in: 3 days
- name: test:rubocop
stage: test
image: sunci/ruby:3.2.2
before_script:
- bundle _2.1.4_ install --path vendor/bundle
script:
- bundle exec rubocop --require rubocop/formatter/checkstyle_formatter --format RuboCop::Formatter::CheckstyleFormatter --no-color app/ lib/