-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathconfig.yml
49 lines (49 loc) · 1.38 KB
/
config.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
version: 2.1
jobs:
build:
docker:
- image: ruby:3.3.6
- image: cimg/postgres:14.7
environment:
POSTGRES_USER: "ubuntu"
POSTGRES_DB: "avro-schema-registry_test"
POSTGRES_HOST_AUTH_METHOD: "trust"
environment:
RACK_ENV: "test"
RAILS_ENV: "test"
CIRCLE_TEST_REPORTS: "test-results"
DB_HOST: "localhost"
DB_USER: "ubuntu"
working_directory: ~/avro-schema-registry
steps:
- checkout
- restore_cache:
keys:
- v1-gems-ruby-3.3.6-{{ checksum "Gemfile.lock" }}
- v1-gems-ruby-3.3.6-
- run:
name: Install Gems
command: |
if ! bundle check --path=vendor/bundle; then
bundle install --path=vendor/bundle --jobs=4 --retry=3
bundle clean
fi
- save_cache:
key: v1-gems-ruby-3.3.6-{{ checksum "Gemfile.lock" }}
paths:
- "vendor/bundle"
- run:
name: Run Rubocop
command: bundle exec rubocop --config .rubocop.yml
- run:
name: Run Tests
command: |
bundle exec rspec --format RspecJunitFormatter --out $CIRCLE_TEST_REPORTS/rspec/junit.xml --format progress spec
- store_test_results:
path: "test-results"
- store_artifacts:
path: "log"
workflows:
build:
jobs:
- build