Skip to content

Using detached docker #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,24 @@ jobs:
run: |
docker build -t ruby-test -f Dockerfile .

- name: Run tests in Docker
- name: Run tests in Docker (retain container)
run: |
docker run --rm \
-v "$(pwd)":/app \
docker run --name ruby-test-container \
-w /app \
ruby-test \
bundle exec rspec --require spec_helper

- name: Copy coverage.json out of container
run: |
docker cp ruby-test-container:/app/coverage/coverage.json coverage.json

- name: Cleanup container
run: docker rm ruby-test-container

- name: Check coverage file exists
run: test -f coverage/coverage.json
run: test -f coverage.json

- uses: qltysh/qlty-action/coverage@v1
with:
oidc: true
files: coverage/coverage.json
files: coverage.json