-
Notifications
You must be signed in to change notification settings - Fork 27
42 lines (42 loc) · 1.3 KB
/
ruby.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Ruby
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.3', '3.0']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch all since test fixtures depend on history
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Build and test with Rake
run: |
gem install bundler undercover --no-doc
bundle install --jobs 4 --retry 3
bundle exec rake
- name: undercover (local)
run: |
git fetch --update-head-ok origin master:master
undercover --compare master
- uses: actions/upload-artifact@v4
with:
name: undercover-${{ matrix.ruby }}.lcov
path: coverage/lcov/undercover.lcov
coverage:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: undercover-3.3.lcov
- name: Upload coverage
run: |
ruby -e "$(curl -s https://undercover-ci.com/uploader.rb)" -- \
--repo grodowski/undercover \
--commit ${{ github.event.pull_request.head.sha || github.sha }} \
--lcov /home/runner/work/undercover/undercover/undercover.lcov