-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add a GitHub actions ci.yml * Split up github build steps * Test with multiple databases on github actions ci * Give bundler more time to install * Report test results to codeclimate * Remove travis.yml Since we now run our tests on Github Actions CI we do not need this anymore. * Rename Github workflow * Update status badge * Uploads build artifacts if build fails
- Loading branch information
Showing
5 changed files
with
65 additions
and
31 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,63 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
RSpec: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby: | ||
- '2.5.x' | ||
- '2.6.x' | ||
database: | ||
- mysql | ||
- postgresql | ||
env: | ||
DB: ${{ matrix.database }} | ||
MYSQL_PASSWORD: root | ||
PGHOST: 127.0.0.1 | ||
PGUSER: postgres | ||
RAILS_ENV: test | ||
CC_TEST_REPORTER_ID: bca4349e32f97919210ac8a450b04904b90683fcdd57d65a22c0f5065482bc22 | ||
services: | ||
postgres: | ||
image: postgres:10 | ||
ports: ['5432:5432'] | ||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby }} | ||
- name: Install Postgres headers | ||
if: matrix.database == 'postgresql' | ||
run: | | ||
sudo apt-get install -yqq libpq-dev | ||
- name: Install MySQL headers | ||
if: matrix.database == 'mysql' | ||
run: | | ||
sudo apt-get install -yqq libmysqlclient-dev | ||
- name: Install bundle | ||
timeout-minutes: 10 | ||
run: | | ||
gem install bundler | ||
bundle install --jobs 4 --retry 3 | ||
- name: Prepare database | ||
run: | | ||
bundle exec rake alchemy:spec:prepare | ||
- name: Install code climate test reporter | ||
run: | | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
./cc-test-reporter before-build | ||
- name: Test with RSpec | ||
run: | | ||
bundle exec rspec | ||
./cc-test-reporter after-build --exit-code $? | ||
- uses: actions/upload-artifact@master | ||
if: failure() | ||
with: | ||
name: Screenshots | ||
path: spec/dummy/tmp/screenshots |
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