Skip to content

Commit

Permalink
Switch to Github Actions (#74)
Browse files Browse the repository at this point in the history
* Switch to Github Actions

* Bump Minemagic to 0.3.10

* Remove DATABASE_ADAPTER environment variable

* Remove hound.yml

* Add rubocop to github workflows

* Create rubocop_todo

* Add TEST_FRAMEWORK environment variable
  • Loading branch information
vsppedro authored Feb 28, 2023
1 parent ee3aeb2 commit d0fff35
Show file tree
Hide file tree
Showing 8 changed files with 433 additions and 42 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Test

on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
types:
- opened
- synchronize
paths-ignore:
- '**.md'

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- 2.4.9
- 2.5.8
- 2.6.6
- 2.7.1
appraisal:
- rails_4_2
- rails_5_0
- rails_5_1
- rails_5_2
- rails_6_0
test_framework:
- minitest
- test_unit
exclude:
- { ruby: 2.4.9, appraisal: rails_6_0 }
- { ruby: 2.6.6, appraisal: rails_4_2 }
- { ruby: 2.7.1, appraisal: rails_4_2 }
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile
TEST_FRAMEWORK: ${{ matrix.test_framework }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
id: set-up-ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- uses: actions/cache@v3
with:
path: vendor/bundle
key: v1-rubygems-local-${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles(format('gemfiles/{0}.gemfile.lock', matrix.appraisal)) }}
- name: Install dependencies
run: bundle install --jobs=3 --retry=3
- name: Run Tests
run: bundle exec rake
30 changes: 30 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: RuboCop

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Setup Ruby
uses: ruby/setup-ruby@v1

- name: Cache gems
uses: actions/cache@v3
with:
path: ../vendor/bundle
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-rubocop-
- name: Install gems
run: |
bundle config path ../vendor/bundle
bundle install --jobs 4 --retry 3
- name: Run RuboCop
run: bundle exec rubocop --parallel
3 changes: 0 additions & 3 deletions .hound.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.4
Exclude:
Expand Down
Loading

0 comments on commit d0fff35

Please sign in to comment.