From 947e041269e3a145488a8323b77114810f622627 Mon Sep 17 00:00:00 2001 From: Oleg Hasjanov Date: Thu, 23 Nov 2023 13:44:51 +0200 Subject: [PATCH] fixed ruby ci --- .github/workflows/ruby.yml | 43 +++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index cc69619..82c677d 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -33,8 +33,26 @@ jobs: bundle config set deployment '[secure]' bundle env head -n1 $(which bundle) + + - name: Copy config files + run: | + cp config/application.yml.example config/application.yml + cp config/database_ci.yml config/database.yml + + - name: Install dependencies + run: | + bundle install --with development --jobs 4 --retry 3 --path vendor/bundle + + - name: Setup database + run: | + bundle exec rake db:create + bundle exec rake db:migrate + bundle exec rake db:schema:load + bundle exec rake db:seed + bundle exec rails assets:precompile - - name: Run Tests + - name: Run Tests with Code Climate + uses: paambaati/codeclimate-action@v3.0.0 env: PG_DATABASE: postgres PG_HOST: localhost @@ -44,15 +62,20 @@ jobs: RAILS_ENV: test COVERAGE: true DISABLE_SPRING: 1 - run: | - cp config/application.yml.example config/application.yml - cp config/database_ci.yml config/database.yml - bundle exec rake db:create - bundle exec rake db:migrate - bundle exec rake db:schema:load - bundle exec rake db:seed - bundle exec rails assets:precompile - bundle exec rspec spec + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + with: + coverageCommand: bundle exec rspec spec + debug: true + + # run: | + # # cp config/application.yml.example config/application.yml + # # cp config/database_ci.yml config/database.yml + # bundle exec rake db:create + # bundle exec rake db:migrate + # bundle exec rake db:schema:load + # bundle exec rake db:seed + # bundle exec rails assets:precompile + # bundle exec rspec spec - name: Dependabot if: ${{ github.event.label.name == 'dependencies' }}