Skip to content

Commit

Permalink
Move from Travis CI to GitHub Actions (#770)
Browse files Browse the repository at this point in the history
  • Loading branch information
sds authored Feb 26, 2022
1 parent 2823a42 commit db2eff6
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 26 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint
on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
overcommit:
timeout-minutes: 10
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true

- name: Prepare environment
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
bundle exec overcommit --sign
- name: Run pre-commit checks
run: bundle exec overcommit --run
52 changes: 52 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Tests
on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
rspec:
timeout-minutes: 10
runs-on: ${{ matrix.os }}-latest

strategy:
matrix:
ruby-version:
- '2.6'
- '2.7'
- '3.0'
- '3.1'
os:
- ubuntu
- windows

steps:
- uses: actions/checkout@v2

- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Run tests
run: bundle exec rspec

- name: Code coverage reporting
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: ruby${{ matrix.ruby-version }}-${{ matrix.os }}
parallel: true

finish:
needs: rspec
runs-on: ubuntu-latest

steps:
- name: Finalize code coverage report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[![Gem Version](https://badge.fury.io/rb/overcommit.svg)](https://badge.fury.io/rb/overcommit)
[![Build Status](https://travis-ci.org/sds/overcommit.svg?branch=master)](https://travis-ci.org/sds/overcommit)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/umui038jlm597ryf?svg=true)](https://ci.appveyor.com/project/sds/overcommit)
[![Build Status](https://github.com/sds/overcommit/actions/workflows/tests.yml/badge.svg?branch=master)](https://github.com/sds/overcommit/actions/workflows/tests.yml/badge.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/sds/overcommit/badge.svg?branch=master)](https://coveralls.io/github/sds/overcommit?branch=master)
[![Maintainability](https://api.codeclimate.com/v1/badges/5da42f7f365e5fef6b4c/maintainability)](https://codeclimate.com/github/sds/overcommit/maintainability)
[![Inline docs](http://inch-ci.org/github/sds/overcommit.svg?branch=master)](http://inch-ci.org/github/sds/overcommit)
Expand Down

0 comments on commit db2eff6

Please sign in to comment.