Skip to content

Commit

Permalink
Add ls and new step
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianPasquale committed Dec 18, 2024
1 parent 6d9a71d commit 90beb15
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,12 @@ jobs:
uses: rootstrap/check_untracked_changes@v1
with:
path: "./app/ ./spec/"
- name: Get app assets from running container
- name: Run LSs
run: |
docker run -it -d --name rails_app api_base/test:latest "sleep infinity"
docker container cp rails_app:/src/app/coverage/. app/coverage/
docker rm -f rails_app
ls
ls -a coverage
- name: Report to CodeClimate
run: ./cc-test-reporter format-coverage --output "coverage/coverage.${{ matrix.ci_node_index }}.json"
- name: Upload partial coverage
uses: actions/upload-artifact@v4
with:
Expand Down
16 changes: 8 additions & 8 deletions bin/rspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ require 'shellwords'
require_relative 'helpers'
require 'optparse'

options = {}
OptionParser.new do |opts|
opts.banner = "Usage: ./bin/rspec [options]"
if running_with_docker?
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: ./bin/rspec [options]"

opts.on("-rm", "--remove-containers", "If provided, all services will be stopped after the test is completed.") do
options[:remove_containers] = true
end
end.parse!
opts.on("-rm", "--remove-containers", "If provided, all services will be stopped after the test is completed.") do
options[:remove_containers] = true
end
end.parse!

if running_with_docker?
compose_command = "docker compose -f docker-compose.test.yml run --build web ./bin/rspec #{Shellwords.join(ARGV)}"

if options[:remove_containers]
Expand Down

0 comments on commit 90beb15

Please sign in to comment.