Skip to content

Commit 06173e9

Browse files
committed
* Add back missing GH Action config file for code coverage
1 parent bf85edb commit 06173e9

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Coverage
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- 'README.md'
9+
push:
10+
branches:
11+
- master
12+
paths-ignore:
13+
- 'README.md'
14+
15+
jobs:
16+
coverage:
17+
name: Coverage
18+
# Homemade support for [ci skip] no longer needed
19+
# https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/
20+
# if: "contains(github.event.commits[0].message, '[ci skip]') == false"
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os:
25+
- ubuntu
26+
ruby:
27+
- 2.7
28+
gemfile:
29+
- gemfiles/rails_5_2.gemfile
30+
- gemfiles/rails_6_0.gemfile
31+
- gemfiles/rails_6_1.gemfile
32+
env:
33+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
34+
COVERALLS: true
35+
runs-on: ${{ matrix.os }}-latest
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v2
39+
40+
- name: Setup Ruby
41+
uses: ruby/setup-ruby@v1
42+
with:
43+
ruby-version: ${{ matrix.ruby }}
44+
bundler-cache: true
45+
46+
- name: Collect coverage info
47+
run: bundle exec rake spec
48+
49+
- name: Coveralls Parallel
50+
uses: coverallsapp/github-action@master
51+
continue-on-error: true
52+
with:
53+
github-token: ${{ secrets.github_token }}
54+
flag-name: run-${{ matrix.ruby }}-${{ matrix.gemfile }}
55+
parallel: true
56+
57+
finish:
58+
needs: coverage
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Send to Coveralls
62+
uses: coverallsapp/github-action@master
63+
with:
64+
github-token: ${{ secrets.GITHUB_TOKEN }}
65+
parallel-finished: true

0 commit comments

Comments
 (0)