Skip to content

Commit

Permalink
Coveralls setup with Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpolito committed May 23, 2023
1 parent dfdbbb8 commit 437a444
Showing 1 changed file with 37 additions and 10 deletions.
47 changes: 37 additions & 10 deletions .github/workflows/ci.yml
Expand Up @@ -2,28 +2,55 @@ name: CI

on:
push:
branches: [master]
branches:
- master
pull_request:
branches: [master]
branches:
- '*'

jobs:
test:
runs-on: ubuntu-latest
build:
name: Ruby ${{ matrix.ruby }}

strategy:
fail-fast: true
matrix:
ruby-version:
ruby:
- '3.2'
- '3.1'
- '3.0'
- 'jruby-head'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
- name: Checkout
uses: actions/checkout@v3

- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # 'bundle install' and cache

- name: Run tests
run: bundle exec rake
run: bundle exec rake --trace
continue-on-error: false

- name: Report coverage
uses: coverallsapp/github-action@v2
with:
flag-name: ruby-${{ matrix.ruby }}
parallel: true

coveralls-done:
if: always()
name: Finish coverage reporting
runs-on: ubuntu-latest
needs: build
steps:
- name: Coveralls done
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: 'ruby-3.2,ruby-3.1,ruby-3.0'

0 comments on commit 437a444

Please sign in to comment.