Skip to content

Commit

Permalink
Store and download artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
vertism committed Jul 15, 2024
1 parent 9218b69 commit 5eefd8d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,32 @@ jobs:
bundle exec rake parallel:setup[4]
bundle exec parallel_rspec -n "${CI_TOTAL_JOBS}" --only-group "${CI_JOB_INDEX}" --group-by "runtime"
- name: collate coverage
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: "coverage-${CI_JOB_INDEX}"
path: "coverage/.resultset.json"

coverage:
needs: test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Download coverage
uses: actions/download-artifact@v4

- name: Collate coverage
run: bundle exec rake coverage:report

- name: Code coverage
- name: Code coverage result
uses: joshmfrankel/simplecov-check-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -113,6 +135,6 @@ jobs:

build-and-deploy:
if: ${{ github.ref == 'refs/heads/main' }}
needs: test
needs: coverage
uses: ./.github/workflows/deploy.yml
secrets: inherit
2 changes: 1 addition & 1 deletion lib/tasks/coverage_report.rake
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ namespace :coverage do
task report: :environment do
require "simplecov"

SimpleCov.collate Dir["coverage/.resultset.json"]
SimpleCov.collate Dir["coverage*"]
end
end

0 comments on commit 5eefd8d

Please sign in to comment.