forked from globalize/globalize
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to GitHub Actions for Continuous Integration (globalize#742)
This covers all the same stuff as before, but inside GitHub, which allows us to see build status much more quickly.
- Loading branch information
Showing
12 changed files
with
105 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: CI | ||
|
||
on: [ push ] | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
architecture: [ x64 ] | ||
database: [ mysql, postgresql, sqlite3 ] | ||
gemfile: [ '5.2.1', '5.1.6', '4.2.10' ] | ||
ruby: [ '2.6.x', '2.5.x', '2.4.x' ] | ||
fail-fast: false | ||
max-parallel: 20 | ||
runs-on: ubuntu-latest | ||
name: ${{ matrix.ruby }} ${{ matrix.database }} rails-${{ matrix.gemfile }} | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
architecture: ${{ matrix.architecture }} | ||
ruby-version: ${{ matrix.ruby }} | ||
version: ${{ matrix.ruby }} | ||
- uses: actions/checkout@v1 | ||
- run: sudo apt-get update | ||
- run: sudo apt-get install libpq-dev postgresql-client -y | ||
if: matrix.database == 'postgresql' | ||
- run: sudo apt-get install libmysqlclient-dev -y | ||
if: matrix.database == 'mysql' | ||
- run: sudo apt-get install libsqlite3-dev -y | ||
if: matrix.database == 'sqlite3' | ||
- id: cache-bundler | ||
uses: actions/cache@v1 | ||
with: | ||
path: gemfiles/vendor/bundle | ||
key: ${{ matrix.ruby }}-gem-${{ hashFiles(format('gemfiles/Gemfile.rails-{0}.rb', matrix.gemfile)) }} | ||
- run: gem install bundler | ||
- run: bundle install --path vendor/bundle | ||
- run: bundle exec rake db:create db:migrate | ||
- run: bundle exec rake test | ||
|
||
env: | ||
BUNDLE_GEMFILE: gemfiles/Gemfile.rails-${{ matrix.gemfile }}.rb | ||
BUNDLE_JOBS: 4 | ||
BUNDLE_PATH: vendor/bundle | ||
CI: true | ||
COVERALLS: true | ||
DB: ${{ matrix.database }} | ||
MYSQL_PASSWORD: root | ||
PGHOST: localhost | ||
PGPORT: 5432 | ||
PGUSER: postgres | ||
RAILS_ENV: test | ||
|
||
services: | ||
postgres: | ||
image: postgres:11.5 | ||
ports: ["5432:5432"] | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
|
||
# Database Configuration | ||
if !ENV['CI'] || ENV['DB'] == 'sqlite3' | ||
gem 'sqlite3', platforms: [:ruby, :rbx] | ||
end | ||
|
||
if !ENV['CI'] || ENV['DB'] == 'mysql' | ||
group :mysql do | ||
gem 'mysql2', platforms: [:ruby, :rbx] | ||
end | ||
end | ||
|
||
if !ENV['CI'] || %w(postgres postgresql).include?(ENV['DB']) | ||
group :postgres, :postgresql do | ||
gem 'pg', '< 1.0', platforms: [:ruby, :rbx] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters