-
Notifications
You must be signed in to change notification settings - Fork 358
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
75 additions
and
95 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,62 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby-version: | ||
- '2.7' | ||
node-version: | ||
- 12 | ||
test-suite: | ||
- spec | ||
- spec:routes | ||
- spec:javascript | ||
- spec:compile | ||
- spec:jest | ||
- spec:debride | ||
include: | ||
- ruby-version: '2.6' | ||
node-version: 12 | ||
test-suite: spec | ||
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_SUITE: ${{ matrix.test-suite }} | ||
PGHOST: localhost | ||
PGPASSWORD: smartvm | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up system | ||
run: bin/before_install | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true | ||
- name: Set up Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: yarn | ||
registry-url: https://npm.manageiq.org/ | ||
- 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/codeclimate-action@v3.0.0 |
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
require 'pathname' | ||
require 'fileutils' | ||
|
||
require "pathname" | ||
|
||
gem_root = Pathname.new(__dir__).join("..") | ||
spec_manageiq = gem_root.join("spec/manageiq") | ||
system(gem_root.join("bin/before_install").to_s) | ||
|
||
if ENV.key?("MANAGEIQ_REPO") | ||
manageiq_repo = Pathname.new(ENV["MANAGEIQ_REPO"]) | ||
puts "== Symlinking spec/manageiq to #{manageiq_repo}" | ||
require gem_root.join("spec/manageiq/lib/manageiq/environment") | ||
ManageIQ::Environment.manageiq_plugin_setup(gem_root) | ||
|
||
FileUtils.rm_rf(spec_manageiq.expand_path) | ||
FileUtils.ln_s(manageiq_repo.expand_path, spec_manageiq.expand_path) | ||
elsif !spec_manageiq.exist? | ||
puts "== Cloning manageiq sample app ==" | ||
system "git clone https://github.com/ManageIQ/manageiq.git --branch master --depth 1 spec/manageiq" | ||
if %w[spec:compile spec:javascript spec:jest].include?(ENV["TEST_SUITE"]) | ||
puts "\n== Updating UI assets ==" | ||
ManageIQ::Environment.update_ui | ||
end | ||
|
||
require gem_root.join("spec/manageiq/lib/manageiq/environment").to_s | ||
ManageIQ::Environment.manageiq_plugin_setup(gem_root) |
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