-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.sun-ci.yml
42 lines (40 loc) · 1 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
workspace: true
stages:
- build
- test
jobs:
- name: build:prepare
stage: build
image: cimg/ruby:3.2.0
script:
- sudo cp database-ci.yml config/database.yml
- bundle config set path 'vendor/bundle'
- sudo gem update --system
- sudo bundle install
cache:
- key: vendor_$CI_BRANCH
paths:
- vendor/bundle
- name: test:rubocop
stage: test
image: cimg/ruby:3.2.0
script:
- gem install rubocop
- gem install rubocop-rails
- gem install rubocop-performance
- gem install rubocop-rspec
- rubocop
- name: test:rspec
stage: test
image: cimg/ruby:3.2.0
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
script:
- sudo RAILS_ENV=test bundle exec rails db:drop db:create db:migrate
- sudo bundle exec rspec