-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.sun-ci.yml
39 lines (39 loc) · 1.25 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
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
- RAILS_ENV=test bin/rails assets:precompile
- 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/