Skip to content

Replace TravisCI to Github Actions #4

Replace TravisCI to Github Actions

Replace TravisCI to Github Actions #4

Workflow file for this run

name: Test
on:
pull_request:
branches: ["master", "main"]
push:
branches: ["master", "main"]
jobs:
test:
runs-on: ubuntu-latest
container: ${{ matrix.ruby }}
env:
CC_TEST_REPORTER_ID: cb01575b98b3b80848a3bc292ca6145860871470e5d0669453030d36578f9115
strategy:
fail-fast: false
matrix:
include:
- ruby: ruby:2.5
- ruby: ruby:2.6
- ruby: ruby:2.7
- ruby: ruby:3.0
coverage: true
name: test/ruby ${{ matrix.ruby }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Bundle install
run: bundle install -j$(nproc) --retry 3
- name: Run tests
run: bundle exec rspec
timeout-minutes: 1
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v3.0.0
if: matrix.coverage
env:
CC_TEST_REPORTER_ID: ${{ env.CC_TEST_REPORTER_ID }}
with:
coverageCommand: bundle exec rspec
coverageLocations: ${{ github.workspace }}/coverage/coverage.json:simplecov
debug: true