From 1d4e9afec13a9bd38630e312dea3aead761fead9 Mon Sep 17 00:00:00 2001 From: Splines Date: Wed, 10 Jan 2024 17:15:03 +0100 Subject: [PATCH] Use GitHub Rspec formatter --- .github/workflows/tests.yml | 15 +++------------ Gemfile | 2 ++ Gemfile.lock | 3 +++ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 97ae1fd9a..dc0131447 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,18 +35,9 @@ jobs: run: | docker buildx bake --file ./docker-compose.yml --file ./../../.github/workflows/docker-compose-cache.json - # For docker layer caching also see this article [1] - # - name: Build docker images - # uses: docker/build-push-action@v5 - # with: - # push: false # only build - # context: . - # cache-from: type=gha - # cache-to: type=gha,mode=max - - name: Create and migrate DB - run: docker compose run --entrypoint "" mampf sh -c "rake db:create db:migrate db:test:prepare" working-directory: docker/test + run: docker compose run --entrypoint "" mampf sh -c "rake db:create db:migrate db:test:prepare" - name: Reindex sunspot working-directory: docker/test @@ -55,9 +46,9 @@ jobs: - name: Run unit tests working-directory: docker/test - run: docker compose run --entrypoint="" mampf sh -c "RAILS_ENV=test rails spec" + run: docker compose run --entrypoint="" mampf sh -c "RAILS_ENV=test bundle exec rspec --format RSpec::Github::Formatter" - - name: Send test coverage report to Codecov + - name: Report test coverage to codecov uses: codecov/codecov-action@v3 with: files: ./coverage/coverage.xml diff --git a/Gemfile b/Gemfile index aa44445ae..75196656d 100644 --- a/Gemfile +++ b/Gemfile @@ -138,6 +138,8 @@ group :test, :development, :docker_development do gem "cypress-on-rails", "~> 1.0" gem "simplecov-cobertura" + + gem "rspec-github" end gem "prometheus_exporter" diff --git a/Gemfile.lock b/Gemfile.lock index 946c11b31..88161ce1b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -472,6 +472,8 @@ GEM rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) + rspec-github (2.4.0) + rspec-core (~> 3.0) rspec-mocks (3.12.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) @@ -700,6 +702,7 @@ DEPENDENCIES responders rgl rqrcode + rspec-github rspec-rails rubocop (~> 1.57) rubocop-performance (~> 1.16)