aggregate coverage report #135
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
name: >- | |
${{ matrix.os }} ${{ matrix.ruby }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
ruby: | |
- "3.4" | |
- "3.3" | |
- "3.2" | |
- "3.1" | |
- "3.0" | |
- "2.7" | |
- "2.6" | |
- "2.5" | |
- "2.4" | |
- "head" | |
- "jruby" | |
- "jruby-head" | |
- "truffleruby" | |
- "truffleruby-head" | |
exclude: | |
- os: windows-latest | |
ruby: truffleruby | |
- os: windows-latest | |
ruby: truffleruby-head | |
- os: macos-latest | |
ruby: 2.4 | |
- os: macos-latest | |
ruby: 2.5 | |
steps: | |
- name: repo checkout | |
uses: actions/checkout@v2 | |
- name: load ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: install libidn2 | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get update -qq -o Acquire::Retries=3 && | |
sudo apt-get install --fix-missing -qq -o Acquire::Retries=3 idn2 | |
- name: install libidn2 | |
if: matrix.os == 'macos-latest' | |
run: brew install libidn2 | |
- name: test | |
env: | |
CI: 1 | |
run: bundle exec rake | |
continue-on-error: ${{ matrix.os == 'windows-latest' || matrix.ruby == 'head' || matrix.ruby == 'jruby-head' || matrix.ruby == 'truffleruby-head' }} | |
- name: Upload coverage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-${{matrix.ruby}}--${{matrix.os}} | |
path: coverage/ | |
include-hidden-files: true | |
coverage: | |
needs: test | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.4 | |
bundler-cache: true | |
- name: Download coverage results | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: coverage-* | |
path: coverage | |
- name: coverage | |
env: | |
CI: 1 | |
run: | | |
find coverage -name "*resultset.json" -exec sed -i 's?${{ github.workspace }}?'`pwd`'?' {} \; | |
bundle exec rake coverage:report | |
- uses: joshmfrankel/simplecov-check-action@main | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |