1
0
mirror of https://github.com/meineerde/rackstash.git synced 2025-10-17 14:01:01 +00:00

100 lines
2.1 KiB
YAML

name: CI
on:
pull_request:
push:
paths-ignore:
- README.md
- CHANGELOG.md
schedule:
- cron: '0 7 * * SUN'
jobs:
rspec:
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
ruby:
- ruby-2.7
- ruby-2.6
- ruby-2.5
- ruby-2.4
- ruby-2.3
- ruby-2.2
- ruby-2.1
- ruby-head
- jruby-9.1
- jruby-9.2
- jruby-head
- truffleruby
- truffleruby-head
include:
- ruby: ruby-2.7
env:
COVERAGE: 'true'
exclude:
# Truffleruby is currently not built on Windows
- ruby: truffleruby
os: windows
- ruby: truffleruby-head
os: windows
runs-on: ${{ matrix.os }}-latest
continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run rspec
run: bundle exec rspec --format progress spec
env:
COVERAGE: ${{ matrix.env.COVERAGE }}
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage/lcov/rackstash.lcov
parallel: true
env:
COVERALLS_FLAG_NAME: rspec-${{ matrix.os }}-${{ matrix.ruby }}
if: matrix.env.COVERAGE == 'true'
coveralls:
needs: rspec
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Run RuboCop
run: |
gem install rubocop
rubocop --parallel