add github actions config (#750)

* add github actions config

As travis stopped be free for all - lets move to github actions.

- Add ruby 3.0 to build matrix
- using DymnaDB ready made action installer did not work - could work with some more time for investigation. But it works the old way.

* Re-enable codecov

* run github actions on ubuntu 20.04

* cleanup build matrix

- remove old minor rails versions 5.0, 5.1
- remove EOL ruby version 2.5

* cleanup gemfiles and Appraisal

remove unused gemsets

* add truffleruby to github actions

* use compact yaml syntax
This commit is contained in:
Tim Aßmann 2021-09-02 09:34:24 +02:00 committed by GitHub
parent 0e03746a2b
commit b94aa9622f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 87 additions and 82 deletions

87
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,87 @@
name: Tests
on:
push:
pull_request:
jobs:
build:
if: "contains(github.event.commits[0].message, '[ci skip]') == false"
continue-on-error: ${{ matrix.allow_failure || false }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
ruby: [3.0, 2.7, 2.6, jruby-9.1.17.0, truffleruby]
gemfile: [norails, rails_4.2, rails_4.2_mongoid_5, rails_5.2, rails_6.1]
exclude:
- ruby: 3.0
gemfile: rails_5.2
- ruby: 3.0
gemfile: rails_4.2
- ruby: 3.0
gemfile: rails_4.2_mongoid_5
- ruby: 2.7
gemfile: rails_5.2
- ruby: 2.7
gemfile: rails_4.2
- ruby: 2.7
gemfile: rails_4.2_mongoid_5
- ruby: 2.6
gemfile: rails_4.2_mongoid_5
- ruby: 2.6
gemfile: rails_4.2
- ruby: jruby-9.1.17.0
gemfile: norails
- ruby: jruby-9.1.17.0
gemfile: rails_5.2
- ruby: jruby-9.1.17.0
gemfile: rails_6.1
- ruby: truffleruby
gemfile: rails_4.2
- ruby: truffleruby
gemfile: rails_4.2_mongoid_5
redis-version: [6]
mongodb-version: [5]
allow_failures:
- false
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
ALLOW_FAILURES: "${{ matrix.allow_failures }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
mkdir /tmp/dynamodb
wget -O - https://s3-ap-southeast-1.amazonaws.com/dynamodb-local-singapore/dynamodb_local_latest.tar.gz | tar xz --directory /tmp/dynamodb
java -Djava.library.path=/tmp/dynamodb/DynamoDBLocal_lib -jar /tmp/dynamodb/DynamoDBLocal.jar -inMemory -delayTransientStatuses -port 30180 &
mongod --version
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup project
run: bundle install
- name: Start Redis
uses: supercharge/redis-github-action@1.2.0
with:
redis-version: ${{ matrix.redis-version }}
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.6.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
# - name: Setup DynamoDB Local
# uses: rrainn/dynamodb-action@v2.0.0
# with:
# port: 8000
# cors: '*'
- name: Run specs
run: bundle exec rspec spec
- name: Run test
run: bundle exec rake test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: false

View File

@ -12,12 +12,6 @@ appraise 'rails_4.2' do
gem "after_commit_everywhere", "~> 1.0"
end
appraise 'rails_4.2_nobrainer' do
gem 'sqlite3', '~> 1.3.5', platforms: :ruby
gem 'rails', '~> 4.2.11'
gem 'nobrainer', '~> 0.33.0'
end
appraise 'rails_4.2_mongoid_5' do
gem 'sqlite3', '~> 1.3.5', platforms: :ruby
gem 'mime-types', '~> 2', platforms: %i[ruby_19 jruby]
@ -27,34 +21,6 @@ appraise 'rails_4.2_mongoid_5' do
gem "after_commit_everywhere", "~> 1.0"
end
appraise 'rails_5.0' do
gem 'sqlite3', '~> 1.3.5', platforms: :ruby
gem 'rails', '~> 5.0.7'
gem 'mongoid', '~> 6.0'
gem 'sequel'
gem 'dynamoid', '~> 1.3', platforms: :ruby
gem 'aws-sdk', '~> 2', platforms: :ruby
gem 'redis-objects'
gem "after_commit_everywhere", "~> 1.0"
end
appraise 'rails_5.0_nobrainer' do
gem 'sqlite3', '~> 1.3.5', platforms: :ruby
gem 'rails', '~> 5.0.7'
gem 'nobrainer', '~> 0.33.0'
end
appraise 'rails_5.1' do
gem 'sqlite3', '~> 1.3.5', platforms: :ruby
gem 'rails', '~> 5.1.7'
gem 'mongoid', '~>6.0'
gem 'sequel'
gem 'dynamoid', '~> 1.3', platforms: :ruby
gem 'aws-sdk', '~>2', platforms: :ruby
gem 'redis-objects'
gem "after_commit_everywhere", "~> 1.0"
end
appraise 'rails_5.2' do
gem 'sqlite3', '~> 1.3.5', platforms: :ruby
gem 'rails', '~> 5.2.4'
@ -66,16 +32,6 @@ appraise 'rails_5.2' do
gem "after_commit_everywhere", "~> 1.0"
end
appraise 'rails_6.0' do
gem 'rails', '~> 6.0.3'
gem 'mongoid', '~>7.0', '>= 7.0.5'
gem 'sequel'
gem 'dynamoid', '~>3.3', platforms: :ruby
gem 'aws-sdk-dynamodb', '~> 1'
gem 'redis-objects'
gem "after_commit_everywhere", "~> 1.0"
end
appraise 'rails_6.1' do
gem 'rails', '~> 6.1.4'
gem 'mongoid', '~>7.0', '>= 7.0.5'

View File

@ -1,14 +0,0 @@
# This file was generated by Appraisal
source "https://rubygems.org"
gem "sqlite3", "~> 1.3.5", platforms: :ruby
gem "rails", "~> 5.0.7"
gem "after_commit_everywhere", "~> 1.0"
gem "mongoid", "~> 6.0"
gem "sequel"
gem "dynamoid", "~> 1.3", platforms: :ruby
gem "aws-sdk", "~> 2", platforms: :ruby
gem "redis-objects"
gemspec path: "../"

View File

@ -1,10 +0,0 @@
# This file was generated by Appraisal
source "https://rubygems.org"
gem "sqlite3", "~> 1.3.5", platforms: :ruby
gem "rails", "~> 5.0.7"
gem "after_commit_everywhere", "~> 1.0"
gem "nobrainer", "~> 0.33.0"
gemspec path: "../"

View File

@ -1,14 +0,0 @@
# This file was generated by Appraisal
source "https://rubygems.org"
gem "sqlite3", "~> 1.3.5", platforms: :ruby
gem "rails", "~> 5.1.7"
gem "after_commit_everywhere", "~> 1.0"
gem "mongoid", "~>6.0"
gem "sequel"
gem "dynamoid", "~> 1.3", platforms: :ruby
gem "aws-sdk", "~>2", platforms: :ruby
gem "redis-objects"
gemspec path: "../"