-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #636 from Fryguy/github_actions
- Loading branch information
Showing
8 changed files
with
48 additions
and
30 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,43 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby-version: | ||
- '2.6' | ||
- '2.7' | ||
rails-version: | ||
- '6.0' | ||
- '6.1' | ||
services: | ||
postgres: | ||
image: manageiq/postgresql:10 | ||
env: | ||
POSTGRESQL_USER: root | ||
POSTGRESQL_PASSWORD: smartvm | ||
POSTGRESQL_DATABASE: vmdb_test | ||
options: --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
env: | ||
TEST_RAILS_VERSION: ${{ matrix.rails-version }} | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true | ||
- name: Prepare tests | ||
run: bin/setup | ||
- name: Run tests | ||
run: bundle exec rake | ||
- name: Report code coverage | ||
if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '2.7' }} | ||
continue-on-error: true | ||
uses: paambaati/[email protected] |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
#!/bin/bash | ||
if [[ -n "$CI" ]]; then | ||
echo 'gem: --no-ri --no-rdoc --no-document' > ~/.gemrc | ||
bundle config --local path $(pwd)/vendor/bundle | ||
|
||
psql -c "CREATE USER root SUPERUSER PASSWORD 'smartvm';" -U postgres | ||
if [ -z "$CI" ]; then | ||
bundle update --jobs=3 | ||
fi | ||
|
||
cp -n spec/dummy/config/database.{tmpl.,}yml | ||
|
||
bundle update --jobs=3 | ||
bundle exec rake spec:setup |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
./setup |
Empty file.
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