1- # Ruby CircleCI 2.1 configuration file
1+ # Ruby CircleCI 2.0 configuration file
22#
33# Check https://circleci.com/docs/2.0/language-ruby/ for more details
44#
55version : 2.1
6+ executors :
7+ docker-publisher :
8+ environment :
9+ IMAGE_NAME : treatment-database-app
10+ docker :
11+ - image : docker:20.10.14-git
12+
13+ orbs :
14+ 15+ 16+ browser-tools :
circleci/[email protected] 17+ coveralls :
coveralls/[email protected] 18+
619jobs :
720 build :
821 docker :
922 # specify the version you desire here
10- - image : circleci /ruby:2.6.5-node-browsers
23+ - image : cimg /ruby:3.3.0
1124
1225 # Specify service dependencies here if necessary
1326 # CircleCI maintains a library of pre-built images
1427 # documented at https://circleci.com/docs/2.0/circleci-images/
1528 # - image: circleci/postgres:9.4
29+
1630 environment :
1731 BUNDLE_PATH : vendor/bundle
1832 BUNDLE_JOBS : 4
@@ -25,10 +39,14 @@ jobs:
2539 CACHE_PATH : /tmp/cache
2640 COVERALLS_PARALLEL : true
2741
42+
2843 working_directory : ~/aaec
2944
3045 steps :
3146 - checkout
47+ - node/install :
48+ node-version : " 18.17.1"
49+ - browser-tools/install-browser-tools
3250
3351 - restore_cache :
3452 keys :
@@ -41,13 +59,15 @@ jobs:
4159 command : |
4260 echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
4361 source $BASH_ENV
44- gem install bundler -v 2.0.1
62+ gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
63+
4564 - run :
4665 name : Install Dependencies
4766 command : |
48- bundle install --jobs=4 --retry=3 --path vendor/bundle
67+ bundle install
4968 sudo apt-get update
50- sudo apt-get install xvfb libfontconfig wkhtmltopdf
69+ sudo apt-get install xvfb libfontconfig
70+
5171 - save_cache :
5272 paths :
5373 - ./vendor/bundle
@@ -57,33 +77,40 @@ jobs:
5777 - run : bundle exec rake db:create
5878 - run : bundle exec rake db:schema:load
5979
80+ # Rubocop
6081 - run :
6182 name : Rubocop
6283 command : |
6384 gem install rubocop
6485 bundle exec rubocop
86+
87+ # Brakeman
88+ - run :
89+ name : Run Brakeman
90+ command : bundle exec brakeman -q -w 2
91+
92+ # Bundler-audit
93+ - run :
94+ name : Install Bundler-audit
95+ command : gem install bundler-audit
96+ - run :
97+ name : Run Bundle-audit
98+ command : bundle exec bundle audit check --update
99+
65100 # run tests!
66101 - run :
67102 name : Run rspec in parallel
68103 command : |
69104 mkdir /tmp/test-results
70105 bundle exec rspec $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
71- # collect reports
72- - store_test_results :
73- path : /tmp/test-results
74- - store_artifacts :
75- path : /tmp/test-results
76- destination : test-results
77- - store_artifacts :
78- path : coverage
79-
80- - deploy :
81- name : Update Coveralls
82- command : |
83- curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_BUILD_NUM&payload[status]=done"
106+ #bundle exec rspec --out /tmp/test-results/rspec.xml $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
107+
108+ - coveralls/upload :
109+ parallel_finished : true
110+ path_to_lcov : /home/circleci/aaec/coverage/lcov/aaec.lcov
111+
84112workflows :
85- version : 2
86- ci :
87- jobs :
88- - build :
89- name : ruby2-6-5
113+ version : 2
114+ ci :
115+ jobs :
116+ - build
0 commit comments