Skip to content

Commit

Permalink
Add Github Actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
blowmage committed Oct 31, 2023
1 parent 0107ea0 commit 01248f2
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
name: Ruby CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
test:
name: test

runs-on: ubuntu-latest
if: |
!( contains(github.event.pull_request.title, '[ci skip]')
|| contains(github.event.pull_request.title, '[skip ci]'))
strategy:
matrix:
ruby-version: ['3.2', '3.1', '3.0', '2.7']

steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: bundle install

- name: Run tests
run: |
ruby -v
bundle -v
bundle exec rake test
rubocop:
name: rubocop

runs-on: ubuntu-latest
if: |
!( contains(github.event.pull_request.title, '[ci skip]')
|| contains(github.event.pull_request.title, '[skip ci]'))
steps:
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Install dependencies
run: bundle install

- name: Run Rubocop
run: |
ruby -v
bundle -v
bundle exec rubocop -v
bundle exec rubocop

0 comments on commit 01248f2

Please sign in to comment.