File tree Expand file tree Collapse file tree 14 files changed +103
-115
lines changed Expand file tree Collapse file tree 14 files changed +103
-115
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ ci :
7
+ runs-on : ubuntu-latest
8
+ strategy :
9
+ fail-fast : false
10
+ matrix :
11
+ ruby-version :
12
+ - ' 2.7'
13
+ node-version :
14
+ - 12
15
+ test-suite :
16
+ - spec
17
+ - spec:compile
18
+ - spec:debride
19
+ - spec:javascript
20
+ - spec:jest
21
+ - spec:routes
22
+ include :
23
+ - ruby-version : ' 2.6'
24
+ node-version : 12
25
+ test-suite : spec
26
+ services :
27
+ postgres :
28
+ image : manageiq/postgresql:10
29
+ env :
30
+ POSTGRESQL_USER : root
31
+ POSTGRESQL_PASSWORD : smartvm
32
+ POSTGRESQL_DATABASE : vmdb_test
33
+ options : --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 5
34
+ ports :
35
+ - 5432:5432
36
+ env :
37
+ TEST_SUITE : ${{ matrix.test-suite }}
38
+ PGHOST : localhost
39
+ PGPASSWORD : smartvm
40
+ CC_TEST_REPORTER_ID : ${{ secrets.CC_TEST_REPORTER_ID }}
41
+ steps :
42
+ - uses : actions/checkout@v2
43
+ - name : Set up system
44
+ run : bin/before_install
45
+ - name : Set up Ruby
46
+ uses : ruby/setup-ruby@v1
47
+ with :
48
+ ruby-version : ${{ matrix.ruby-version }}
49
+ bundler-cache : true
50
+ - name : Set up Node
51
+ if : ${{ matrix.test-suite == 'spec:compile' || matrix.test-suite == 'spec:javascript' || matrix.test-suite == 'spec:jest' }}
52
+ uses : actions/setup-node@v2
53
+ with :
54
+ node-version : ${{ matrix.node-version }}
55
+ cache : yarn
56
+ registry-url : https://npm.manageiq.org/
57
+ - name : Prepare tests
58
+ run : bin/setup
59
+ - name : Run tests
60
+ run : bundle exec rake
61
+ - name : Report code coverage
62
+ if : ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '2.7' && matrix.test-suite == 'spec' }}
63
+ continue-on-error : true
64
+
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ package-lock.json
4
4
Gemfile.lock
5
5
Gemfile.dev.rb
6
6
_yardoc /
7
- bin /*
8
7
coverage /
9
8
doc /
10
9
pkg /
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# ManageIQ::UI::Classic
2
2
3
3
[ ![ Gem Version] ( https://badge.fury.io/rb/manageiq-ui-classic.svg )] ( http://badge.fury.io/rb/manageiq-ui-classic )
4
- [ ![ Build Status ] ( https://travis-ci .com/ManageIQ/manageiq-ui-classic. svg?branch=master )] ( https://travis-ci .com/github/ ManageIQ/manageiq-ui-classic )
4
+ [ ![ CI ] ( https://github .com/ManageIQ/manageiq-ui-classic/actions/workflows/ci.yaml/badge. svg )] ( https://github .com/ManageIQ/manageiq-ui-classic/actions/workflows/ci.yaml )
5
5
[ ![ Code Climate] ( https://codeclimate.com/github/ManageIQ/manageiq-ui-classic.svg )] ( https://codeclimate.com/github/ManageIQ/manageiq-ui-classic )
6
6
[ ![ Test Coverage] ( https://codeclimate.com/github/ManageIQ/manageiq-ui-classic/badges/coverage.svg )] ( https://codeclimate.com/github/ManageIQ/manageiq-ui-classic/coverage )
7
7
[ ![ Coverage Status] ( https://coveralls.io/repos/github/ManageIQ/manageiq-ui-classic/badge.svg?branch=master )] ( https://coveralls.io/github/ManageIQ/manageiq-ui-classic?branch=master )
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [ -n " $CI " ]; then
4
+ echo " == Installing system packages =="
5
+ sudo apt-get install libcurl4-openssl-dev
6
+ echo
7
+ fi
8
+
9
+ if [ -n " $CI " -a \( " $TEST_SUITE " = " spec:javascript" -o " $TEST_SUITE " = " spec:jest" \) ]; then
10
+ echo " hi"
11
+ sudo apt-get install google-chrome-beta
12
+ echo
13
+ fi
14
+
15
+ gem_root=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." & > /dev/null && pwd) "
16
+ spec_manageiq=" $gem_root /spec/manageiq"
17
+
18
+ if [ -n " $MANAGEIQ_REPO " ]; then
19
+ echo " == Symlinking spec/manageiq to $MANAGEIQ_REPO =="
20
+ rm -rf " $spec_manageiq "
21
+ ln -s " $( cd " $MANAGEIQ_REPO " & > /dev/null && pwd) " " $spec_manageiq "
22
+ elif [ ! -d " $spec_manageiq " ]; then
23
+ echo " == Cloning manageiq sample app =="
24
+ git clone https://github.com/ManageIQ/manageiq.git --branch master --depth 1 " $spec_manageiq "
25
+ fi
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
# Run only against PR that is based on master
2
- if [ " $TRAVIS_PULL_REQUEST " != " false " -a " $TRAVIS_BRANCH " = " master" ]; then
2
+ if [ " $GITHUB_BASE_REF " = " master" ]; then
3
3
OLD=` mktemp`
4
4
NEW=` mktemp`
5
5
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env ruby
2
- require 'pathname'
3
- require 'fileutils'
2
+
3
+ require "pathname"
4
4
5
5
gem_root = Pathname . new ( __dir__ ) . join ( ".." )
6
- spec_manageiq = gem_root . join ( "spec/manageiq" )
6
+ system ( gem_root . join ( "bin/before_install" ) . to_s )
7
7
8
- if ENV . key? ( "MANAGEIQ_REPO" )
9
- manageiq_repo = Pathname . new ( ENV [ "MANAGEIQ_REPO" ] )
10
- puts "== Symlinking spec/manageiq to #{ manageiq_repo } "
8
+ require gem_root . join ( "spec/manageiq/lib/manageiq/environment" )
9
+ ManageIQ ::Environment . manageiq_plugin_setup ( gem_root )
11
10
12
- FileUtils . rm_rf ( spec_manageiq . expand_path )
13
- FileUtils . ln_s ( manageiq_repo . expand_path , spec_manageiq . expand_path )
14
- elsif !spec_manageiq . exist?
15
- puts "== Cloning manageiq sample app =="
16
- system "git clone https://github.com/ManageIQ/manageiq.git --branch master --depth 1 spec/manageiq"
11
+ if %w[ spec:compile spec:javascript spec:jest ] . include? ( ENV [ "TEST_SUITE" ] )
12
+ puts "\n == Updating UI assets =="
13
+ exit $?. exitstatus unless system ( "bundle exec rake update:ui" )
17
14
end
18
-
19
- require gem_root . join ( "spec/manageiq/lib/manageiq/environment" ) . to_s
20
- ManageIQ ::Environment . manageiq_plugin_setup ( gem_root )
Original file line number Diff line number Diff line change 13
13
require gem_root . join ( "spec/manageiq/lib/manageiq/environment" ) . to_s
14
14
ManageIQ ::Environment . manageiq_plugin_update ( gem_root )
15
15
16
+ puts "\n == Updating UI assets =="
16
17
ManageIQ ::Environment . update_ui
Original file line number Diff line number Diff line change 85
85
# compile and clobber when running assets:* tasks
86
86
if Rake ::Task . task_defined? ( "assets:precompile" )
87
87
Rake ::Task [ "assets:precompile" ] . enhance do
88
- Rake ::Task [ "webpack:compile" ] . invoke unless ENV [ "TRAVIS " ]
88
+ Rake ::Task [ "webpack:compile" ] . invoke unless ENV [ "CI " ]
89
89
end
90
90
91
91
Rake ::Task [ "assets:precompile" ] . actions . each do |action |
97
97
98
98
if Rake ::Task . task_defined? ( "assets:clobber" )
99
99
Rake ::Task [ "assets:clobber" ] . enhance do
100
- Rake ::Task [ "webpack:clobber" ] . invoke unless ENV [ "TRAVIS " ]
100
+ Rake ::Task [ "webpack:clobber" ] . invoke unless ENV [ "CI " ]
101
101
end
102
102
103
103
Rake ::Task [ "assets:clobber" ] . actions . each do |action |
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
s . add_development_dependency "guard-rspec" , '~> 4.7.3'
33
33
s . add_development_dependency "manageiq-style"
34
34
s . add_development_dependency "rails-controller-testing" , '~> 1.0.2'
35
- s . add_development_dependency "simplecov"
35
+ s . add_development_dependency "simplecov" , ">= 0.21.2"
36
36
37
37
# core because jasmine gem depends on major version only, meaning breakages when not the latest
38
38
s . add_development_dependency "jasmine" , "~> 3.4.0"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments