From 35c8d55f150584dea855b8eb43faf6ee336949b8 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Wed, 24 Jul 2019 11:12:09 +0200 Subject: [PATCH 01/38] Start CircleCI integration --- .circleci/config.yml | 59 ++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 3 ++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..8b1327e6 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,59 @@ +# Ruby CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-ruby/ for more details +# +version: 2 +jobs: + build: + docker: + # specify the version you desire here + - image: circleci/ruby:2.4.1-node-browsers + + # Specify service dependencies here if necessary + # CircleCI maintains a library of pre-built images + # documented at https://circleci.com/docs/2.0/circleci-images/ + # - image: circleci/postgres:9.4 + + working_directory: ~/repo + + steps: + - checkout + + # Download and cache dependencies + - restore_cache: + keys: + - v1-dependencies-{{ checksum "Gemfile.lock" }} + # fallback to using the latest cache if no exact match is found + - v1-dependencies- + + - run: + name: install dependencies + command: | + bundle install --jobs=4 --retry=3 --path vendor/bundle + + - save_cache: + paths: + - ./vendor/bundle + key: v1-dependencies-{{ checksum "Gemfile.lock" }} + + # run tests! + - run: + name: run tests + command: | + mkdir /tmp/test-results + TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \ + circleci tests split --split-by=timings)" + + bundle exec rspec \ + --format progress \ + --format RspecJunitFormatter \ + --out /tmp/test-results/rspec.xml \ + --format progress \ + $TEST_FILES + + # collect reports + - store_test_results: + path: /tmp/test-results + - store_artifacts: + path: /tmp/test-results + destination: test-results diff --git a/.gitignore b/.gitignore index 961a9f24..219efe44 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,8 @@ # Ignore gem /*.gem -/hps-cucumber-groovy/target/ # Ignore Mac files .DS_Store + +vendor From ee9ded5aa2493bc759f89aa8a1520ab8f50f0fda Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Wed, 24 Jul 2019 11:16:35 +0200 Subject: [PATCH 02/38] Add CircleCI badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index aef16078..a98a8450 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ HipTest Publisher ============== +[![CircleCI](https://circleci.com/gh/hiptest/hiptest-publisher.svg?style=svg)](https://circleci.com/gh/hiptest/hiptest-publisher) [![Build Status Linux](https://travis-ci.org/hiptest/hiptest-publisher.svg?branch=master)](https://travis-ci.org/hiptest/hiptest-publisher) [![Build Status Windows](https://ci.appveyor.com/api/projects/status/ciahcci0ayr1oihr/branch/master?svg=true)](https://ci.appveyor.com/project/hiptest/hiptest-publisher) [![Gem Version](https://badge.fury.io/rb/hiptest-publisher.svg)](http://badge.fury.io/rb/hiptest-publisher) From 14b1fea13ba5dd57a37454efc7e84d8ce74ee8f8 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Wed, 24 Jul 2019 14:43:17 +0200 Subject: [PATCH 03/38] Add JUnit formatter gem --- Gemfile | 1 + Gemfile.lock | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index ddcec463..69c8046b 100644 --- a/Gemfile +++ b/Gemfile @@ -24,4 +24,5 @@ end group :test do gem 'webmock' + gem 'rspec_junit_formatter' end diff --git a/Gemfile.lock b/Gemfile.lock index 760a5be8..6cfee8cb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -140,6 +140,8 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-support (3.8.0) + rspec_junit_formatter (0.4.1) + rspec-core (>= 2, < 4, != 2.12.0) ruby-handlebars (0.1.1) parslet (~> 1.6, >= 1.6.2) ruby_version (1.0.1) @@ -179,6 +181,7 @@ DEPENDENCIES pry-byebug (~> 3) rspec (~> 3.3) rspec-mocks (~> 3.3) + rspec_junit_formatter ruby-handlebars (~> 0.1) ruby_version (~> 1) webmock From 3176cad1e9c1a5fb37970cba85a52e26e1ce4ba7 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Wed, 24 Jul 2019 15:41:29 +0200 Subject: [PATCH 04/38] Debugging for Circle CI --- lib/hiptest-publisher/client.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/hiptest-publisher/client.rb b/lib/hiptest-publisher/client.rb index 57a7ff05..76c632b8 100644 --- a/lib/hiptest-publisher/client.rb +++ b/lib/hiptest-publisher/client.rb @@ -188,6 +188,10 @@ def send_request(request) end def find_proxy_uri(address, port) + puts "----------------------------------------------------" + puts "Found HTTP_PROXY: #{ENV['http_proxy']}" + puts "----------------------------------------------------" + URI::HTTP.new( "http", nil, address, port, nil, nil, nil, nil, nil ).find_proxy From 34006cb55a995d5587aaacd031d2b32086283dce Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Wed, 24 Jul 2019 15:45:44 +0200 Subject: [PATCH 05/38] Revert previous commit --- lib/hiptest-publisher/client.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/hiptest-publisher/client.rb b/lib/hiptest-publisher/client.rb index 76c632b8..57a7ff05 100644 --- a/lib/hiptest-publisher/client.rb +++ b/lib/hiptest-publisher/client.rb @@ -188,10 +188,6 @@ def send_request(request) end def find_proxy_uri(address, port) - puts "----------------------------------------------------" - puts "Found HTTP_PROXY: #{ENV['http_proxy']}" - puts "----------------------------------------------------" - URI::HTTP.new( "http", nil, address, port, nil, nil, nil, nil, nil ).find_proxy From 5bffab73694183ed79aeeb0b8aa11e13285d8c54 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Wed, 24 Jul 2019 16:06:34 +0200 Subject: [PATCH 06/38] Test another Ruby version --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8b1327e6..e599311c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: build: docker: # specify the version you desire here - - image: circleci/ruby:2.4.1-node-browsers + - image: circleci/ruby:2.3.8-node-browsers # Specify service dependencies here if necessary # CircleCI maintains a library of pre-built images From d9d1e2c7a037d97b8f21902a275b3a4acb055684 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Wed, 24 Jul 2019 16:29:08 +0200 Subject: [PATCH 07/38] Try workflows to run on multiple ruby versions --- .circleci/config.yml | 93 ++++++++++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 33 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e599311c..c8938e51 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,58 +2,85 @@ # # Check https://circleci.com/docs/2.0/language-ruby/ for more details # -version: 2 -jobs: - build: - docker: - # specify the version you desire here - - image: circleci/ruby:2.3.8-node-browsers - - # Specify service dependencies here if necessary - # CircleCI maintains a library of pre-built images - # documented at https://circleci.com/docs/2.0/circleci-images/ - # - image: circleci/postgres:9.4 - - working_directory: ~/repo +version: 2.1 +commands: + build_and_test: + description: "Build and run the tests" + parameters: + output_dir: + type: string + default: "" steps: - checkout - # Download and cache dependencies - - restore_cache: - keys: - - v1-dependencies-{{ checksum "Gemfile.lock" }} - # fallback to using the latest cache if no exact match is found - - v1-dependencies- - - run: name: install dependencies command: | bundle install --jobs=4 --retry=3 --path vendor/bundle - - save_cache: - paths: - - ./vendor/bundle - key: v1-dependencies-{{ checksum "Gemfile.lock" }} - - # run tests! - run: name: run tests command: | - mkdir /tmp/test-results + mkdir /tmp/test-results/<< parameters.output_dir >> TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \ circleci tests split --split-by=timings)" bundle exec rspec \ --format progress \ --format RspecJunitFormatter \ - --out /tmp/test-results/rspec.xml \ + --out /tmp/test-results/<< parameters.output_dir >>/rspec.xml \ --format progress \ $TEST_FILES - # collect reports - store_test_results: - path: /tmp/test-results - - store_artifacts: - path: /tmp/test-results - destination: test-results + path: /tmp/test-results/<< parameters.output_dir >> + +jobs: + build-ruby-2.3: + docker: + - image: circleci/ruby:2.3.8 + + working_directory: ~/repo + steps: + - build_and_test: + output_dir: "2.3" + +jobs: + build-ruby-2.4: + docker: + - image: circleci/ruby:2.4.5 + + working_directory: ~/repo + steps: + - build_and_test: + output_dir: "2.4" + +jobs: + build-ruby-2.5: + docker: + - image: circleci/ruby:2.5.5 + + working_directory: ~/repo + steps: + - build_and_test: + output_dir: "2.5" + +jobs: + build-ruby-2.6: + docker: + - image: circleci/ruby:2.6.2 + + working_directory: ~/repo + steps: + - build_and_test: + output_dir: "2.6" + +workflows: + version: 2 + build: + jobs: + - build-ruby-2.3 + - build-ruby-2.4 + - build-ruby-2.5 + - build-ruby-2.6 From 977eeecbaf7ece44015500095e7aa91425b02e7a Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Wed, 24 Jul 2019 16:33:06 +0200 Subject: [PATCH 08/38] Fix typos in circle ci config --- .circleci/config.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c8938e51..f05a2e47 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,3 @@ -# Ruby CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-ruby/ for more details -# version: 2.1 commands: @@ -37,7 +33,7 @@ commands: path: /tmp/test-results/<< parameters.output_dir >> jobs: - build-ruby-2.3: + build-ruby-2_3: docker: - image: circleci/ruby:2.3.8 @@ -46,8 +42,7 @@ jobs: - build_and_test: output_dir: "2.3" -jobs: - build-ruby-2.4: + build-ruby-2_4: docker: - image: circleci/ruby:2.4.5 @@ -56,8 +51,7 @@ jobs: - build_and_test: output_dir: "2.4" -jobs: - build-ruby-2.5: + build-ruby-2_5: docker: - image: circleci/ruby:2.5.5 @@ -66,8 +60,7 @@ jobs: - build_and_test: output_dir: "2.5" -jobs: - build-ruby-2.6: + build-ruby-2_6: docker: - image: circleci/ruby:2.6.2 @@ -80,7 +73,7 @@ workflows: version: 2 build: jobs: - - build-ruby-2.3 - - build-ruby-2.4 - - build-ruby-2.5 - - build-ruby-2.6 + - build-ruby-2_3 + - build-ruby-2_4 + - build-ruby-2_5 + - build-ruby-2_6 From 3573dde9421a642ad061f94e67312cf5c40b89ad Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 10:51:38 +0200 Subject: [PATCH 09/38] Try second workflow to run hps tests too --- .circleci/config.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f05a2e47..8687229c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -69,6 +69,18 @@ jobs: - build_and_test: output_dir: "2.6" + hps-behat: + docker: + - image: hiptest/hiptest-publisher-samples + + working_directory: /hiptest-publisher-samples/hps/hps-behat + steps: + - run: + name: run tests + command: | + vendor/bin/behat -f cucumber_json + + workflows: version: 2 build: @@ -77,3 +89,7 @@ workflows: - build-ruby-2_4 - build-ruby-2_5 - build-ruby-2_6 + + run_samples: + jobs: + - hps-behat From 4a5c3cf65fad912f192aeb9dc95c9ad39c9d89ed Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 11:40:39 +0200 Subject: [PATCH 10/38] Regenerate samples for behat before running them --- .circleci/config.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8687229c..e42795fb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,22 +73,27 @@ jobs: docker: - image: hiptest/hiptest-publisher-samples - working_directory: /hiptest-publisher-samples/hps/hps-behat + working_directory: ~/repo + steps: - run: name: run tests command: | - vendor/bin/behat -f cucumber_json + bundle + rake install + cd /hiptest-publisher-samples/hps/hps-behat + hiptest-publisher -t $SECRET_TOEKN -c behat.conf --without=actionwords + vendor/bin/behat workflows: version: 2 - build: - jobs: - - build-ruby-2_3 - - build-ruby-2_4 - - build-ruby-2_5 - - build-ruby-2_6 + # build: + # jobs: + # - build-ruby-2_3 + # - build-ruby-2_4 + # - build-ruby-2_5 + # - build-ruby-2_6 run_samples: jobs: From 4b65051a35b4dae4c6bf521109fe05f5aa7b5292 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 11:52:28 +0200 Subject: [PATCH 11/38] Checkout repo before installing ... --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index e42795fb..deefac81 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -76,6 +76,7 @@ jobs: working_directory: ~/repo steps: + - checkout - run: name: run tests command: | From 907ff13fca9681cc6fcfc9654a480641988dcda3 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 13:54:25 +0200 Subject: [PATCH 12/38] Split hiptest publisher install and use bundle for rake --- .circleci/config.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index deefac81..07bc24ea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -69,6 +69,19 @@ jobs: - build_and_test: output_dir: "2.6" + install-hiptest-publisher: + docker: + - image: hiptest/hiptest-publisher-samples + + working_directory: ~/repo + steps: + - checkout + - run: + name: Install hiptest-publisher + command: | + bundle + bundle exec rake install + hps-behat: docker: - image: hiptest/hiptest-publisher-samples @@ -80,10 +93,8 @@ jobs: - run: name: run tests command: | - bundle - rake install cd /hiptest-publisher-samples/hps/hps-behat - hiptest-publisher -t $SECRET_TOEKN -c behat.conf --without=actionwords + hiptest-publisher -t $SECRET_TOKEN -c behat.conf --without=actionwords vendor/bin/behat @@ -98,4 +109,7 @@ workflows: run_samples: jobs: - - hps-behat + - install-hiptest-publisher + - hps-behat: + requires: + - install-hiptest-publisher From 4ed5733f61b616fe454c28b462d56cfbddd647f2 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 14:23:39 +0200 Subject: [PATCH 13/38] Try caching gems to share publisher between jobs --- .circleci/config.yml | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 07bc24ea..c6218f86 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,10 @@ version: 2.1 commands: + ############################################################################# + # Hiptest publisher CI jobs # + ############################################################################# + build_and_test: description: "Build and run the tests" parameters: @@ -9,7 +13,6 @@ commands: default: "" steps: - checkout - - run: name: install dependencies command: | @@ -69,18 +72,33 @@ jobs: - build_and_test: output_dir: "2.6" + ############################################################################# + # Hiptest publisher samples jobs # + ############################################################################# + install-hiptest-publisher: docker: - image: hiptest/hiptest-publisher-samples working_directory: ~/repo steps: + - restore_cache: + keys: + # when lock file changes, use increasingly general patterns to restore cache + - v1-gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} + - v1-gem-cache-{{ arch }}-{{ .Branch }}- + - v1-gem-cache-{{ arch }}- - checkout - run: name: Install hiptest-publisher command: | - bundle + bundle install && bundle clean bundle exec rake install + - save_cache: + paths: + - ~/.bundle + key: v1-gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} + hps-behat: docker: @@ -90,6 +108,11 @@ jobs: steps: - checkout + - run: + name: Install hiptest-publisher + command: | + bundle install && bundle clean + bundle exec rake install - run: name: run tests command: | From 01c433d93e34a8e62a7f3bf2b93715902a4a8c3f Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 14:31:39 +0200 Subject: [PATCH 14/38] use force on buncle clean --- .circleci/config.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c6218f86..84f95bc9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,12 +92,15 @@ jobs: - run: name: Install hiptest-publisher command: | - bundle install && bundle clean - bundle exec rake install + bundle install && bundle clean --force - save_cache: paths: - ~/.bundle key: v1-gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} + - run: + name: Install hiptest-publisher + command: | + bundle exec rake install hps-behat: From 9d17ea9b96caa7bd82d4a9366dae4ec179714e11 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 14:38:24 +0200 Subject: [PATCH 15/38] Try gem caching between samples jobs --- .circleci/config.yml | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 84f95bc9..846129e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,6 +35,24 @@ commands: - store_test_results: path: /tmp/test-results/<< parameters.output_dir >> + restore_bundler_cache: + description: "Restore cached gems" + steps: + - restore_cache: + keys: + # when lock file changes, use increasingly general patterns to restore cache + - v1-gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} + - v1-gem-cache-{{ arch }}-{{ .Branch }}- + - v1-gem-cache-{{ arch }}- + + install_hiptest_publisher: + description: "Install Hiptest publisher" + steps: + - run: + name: Install hiptest-publisher + command: | + bundle exec rake install + jobs: build-ruby-2_3: docker: @@ -82,12 +100,7 @@ jobs: working_directory: ~/repo steps: - - restore_cache: - keys: - # when lock file changes, use increasingly general patterns to restore cache - - v1-gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - v1-gem-cache-{{ arch }}-{{ .Branch }}- - - v1-gem-cache-{{ arch }}- + - restore_bundler_cache - checkout - run: name: Install hiptest-publisher @@ -97,11 +110,7 @@ jobs: paths: - ~/.bundle key: v1-gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - run: - name: Install hiptest-publisher - command: | - bundle exec rake install - + - install_hiptest_publisher hps-behat: docker: @@ -110,12 +119,9 @@ jobs: working_directory: ~/repo steps: + - restore_bundler_cache - checkout - - run: - name: Install hiptest-publisher - command: | - bundle install && bundle clean - bundle exec rake install + - install_hiptest_publisher - run: name: run tests command: | From d33a6acd43632562560edcfb3769cd1b1b3482ba Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 14:41:15 +0200 Subject: [PATCH 16/38] Run checkout before so Gemfile is available --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 846129e3..2a130c23 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -100,8 +100,8 @@ jobs: working_directory: ~/repo steps: - - restore_bundler_cache - checkout + - restore_bundler_cache - run: name: Install hiptest-publisher command: | @@ -119,8 +119,8 @@ jobs: working_directory: ~/repo steps: - - restore_bundler_cache - checkout + - restore_bundler_cache - install_hiptest_publisher - run: name: run tests From e5ad6b8263a573968e7cdb5507c49a332e4005d2 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 14:49:24 +0200 Subject: [PATCH 17/38] Recover gems before installing publisher --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2a130c23..c3e0d480 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -51,6 +51,7 @@ commands: - run: name: Install hiptest-publisher command: | + bundle install bundle exec rake install jobs: From e45e67129073ad5d9242f11ceb23670591b717bc Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 15:05:27 +0200 Subject: [PATCH 18/38] Run hps-behave tests --- .circleci/config.yml | 46 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c3e0d480..d02b525f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,6 +54,26 @@ commands: bundle install bundle exec rake install + regenerate_tests: + description: "Regenerate tests with hiptest-publisher" + parameters: + project_path: + type: string + default: "" + config_file: + type: string + default: "" + + steps: + - checkout + - restore_bundler_cache + - install_hiptest_publisher + - run: + name: Generate tests + command: | + cd /hiptest-publisher-samples/hps/<< parameters.project_path >> + hiptest-publisher -t $SECRET_TOKEN -c << parameters.config_file >> --without=actionwords + jobs: build-ruby-2_3: docker: @@ -118,19 +138,30 @@ jobs: - image: hiptest/hiptest-publisher-samples working_directory: ~/repo - steps: - - checkout - - restore_bundler_cache - - install_hiptest_publisher + - regenerate_tests: + project_path: "hps-behat" + config_file: "behat.conf" - run: name: run tests command: | - cd /hiptest-publisher-samples/hps/hps-behat - hiptest-publisher -t $SECRET_TOKEN -c behat.conf --without=actionwords vendor/bin/behat + hps-behave: + docker: + - image: hiptest/hiptest-publisher-samples + + working_directory: ~/repo + steps: + - regenerate_tests: + project_path: "hps-behave" + config_file: "behave.conf" + - run: + name: run tests + command: | + behave + workflows: version: 2 # build: @@ -146,3 +177,6 @@ workflows: - hps-behat: requires: - install-hiptest-publisher + - hps-behave: + requires: + - install-hiptest-publisher From 87e7fa85f5ab46d8346d52c5a0c680d66ea081e0 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 15:10:46 +0200 Subject: [PATCH 19/38] Forgot indentation for regenerate tests command --- .circleci/config.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d02b525f..8fd966bf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -136,27 +136,26 @@ jobs: hps-behat: docker: - image: hiptest/hiptest-publisher-samples - working_directory: ~/repo + steps: - regenerate_tests: - project_path: "hps-behat" - config_file: "behat.conf" + project_path: "hps-behat" + config_file: "behat.conf" - run: name: run tests command: | vendor/bin/behat - hps-behave: docker: - image: hiptest/hiptest-publisher-samples - working_directory: ~/repo + steps: - regenerate_tests: - project_path: "hps-behave" - config_file: "behave.conf" + project_path: "hps-behave" + config_file: "behave.conf" - run: name: run tests command: | From 2b5c6cef2f99930ebf1191b126a1761e093d9275 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 15:15:42 +0200 Subject: [PATCH 20/38] Run tests in correct directory --- .circleci/config.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8fd966bf..3bb0f685 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,8 +54,8 @@ commands: bundle install bundle exec rake install - regenerate_tests: - description: "Regenerate tests with hiptest-publisher" + regenerate_and_run_tests: + description: "Regenerate tests with hiptest-publisher and run them" parameters: project_path: type: string @@ -63,7 +63,9 @@ commands: config_file: type: string default: "" - + test_command: + type: string + default: "echo 'No test command provided'" steps: - checkout - restore_bundler_cache @@ -73,6 +75,7 @@ commands: command: | cd /hiptest-publisher-samples/hps/<< parameters.project_path >> hiptest-publisher -t $SECRET_TOKEN -c << parameters.config_file >> --without=actionwords + << parameters.test_command >> jobs: build-ruby-2_3: @@ -139,13 +142,10 @@ jobs: working_directory: ~/repo steps: - - regenerate_tests: + - regenerate_and_run_tests: project_path: "hps-behat" config_file: "behat.conf" - - run: - name: run tests - command: | - vendor/bin/behat + test_command: "vendor/bin/behat" hps-behave: docker: @@ -153,13 +153,10 @@ jobs: working_directory: ~/repo steps: - - regenerate_tests: + - regenerate_and_run_tests: project_path: "hps-behave" config_file: "behave.conf" - - run: - name: run tests - command: | - behave + test_command: "behave" workflows: version: 2 From c7186167d951b603cc79f5db0dd341d814617313 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 15:37:37 +0200 Subject: [PATCH 21/38] Run hps-python-unittest --- .circleci/config.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3bb0f685..115284b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -158,6 +158,17 @@ jobs: config_file: "behave.conf" test_command: "behave" + hps-python-unittest: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-python-unittest" + config_file: "python-unittest.conf" + test_command: "bin/test" + workflows: version: 2 # build: @@ -176,3 +187,6 @@ workflows: - hps-behave: requires: - install-hiptest-publisher + - hps-python-unittest: + requires: + - install-hiptest-publisher From 887ef9826a66b72864014ac08467eeda3be13455 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 16:56:40 +0200 Subject: [PATCH 22/38] Add support for java based samples --- .circleci/config.yml | 70 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 115284b0..923108ef 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -158,6 +158,61 @@ jobs: config_file: "behave.conf" test_command: "behave" + hps-cucumber-groovy: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-cucumber-groovy" + config_file: "cucumber-groovy.conf" + test_command: "mvn test" + + hps-cucumber-java: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-cucumber-java" + config_file: "cucumber-java.conf" + test_command: "mvn test" + + hps-groovy-spock: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-groovy-spock" + config_file: "groovy-spock.conf" + test_command: "mvn test" + + hps-java-junit: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-java-junit" + config_file: "junit.conf" + test_command: "mvn test" + + hps-java-testng: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-java-testng" + config_file: "java-testng.conf" + test_command: "mvn test" + hps-python-unittest: docker: - image: hiptest/hiptest-publisher-samples @@ -190,3 +245,18 @@ workflows: - hps-python-unittest: requires: - install-hiptest-publisher + - hps-cucumber-groovy: + requires: + - install-hiptest-publisher + - hps-cucumber-java: + requires: + - install-hiptest-publisher + - hps-groovy-spock: + requires: + - install-hiptest-publisher + - hps-java-junit: + requires: + - install-hiptest-publisher + - hps-java-testng: + requires: + - install-hiptest-publisher From efc43f80ad547169560a7a068cccc74c4dc2797b Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 29 Jul 2019 17:12:05 +0200 Subject: [PATCH 23/38] Add support for jbehave --- .circleci/config.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 923108ef..cd6a782b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -213,6 +213,17 @@ jobs: config_file: "java-testng.conf" test_command: "mvn test" + hps-jbehave: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-jbehave" + config_file: "jbehave.conf" + test_command: "mvn integration-test" + hps-python-unittest: docker: - image: hiptest/hiptest-publisher-samples @@ -260,3 +271,6 @@ workflows: - hps-java-testng: requires: - install-hiptest-publisher + - hps-jbehave: + requires: + - install-hiptest-publisher From c3769510add6a7146fcc7c8c828963180b3ec315 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Tue, 30 Jul 2019 17:46:23 +0200 Subject: [PATCH 24/38] Use make to simplify running hps --- .circleci/config.yml | 69 +++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 29 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cd6a782b..73f2639b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,12 +60,6 @@ commands: project_path: type: string default: "" - config_file: - type: string - default: "" - test_command: - type: string - default: "echo 'No test command provided'" steps: - checkout - restore_bundler_cache @@ -74,8 +68,8 @@ commands: name: Generate tests command: | cd /hiptest-publisher-samples/hps/<< parameters.project_path >> - hiptest-publisher -t $SECRET_TOKEN -c << parameters.config_file >> --without=actionwords - << parameters.test_command >> + make generate_tests + make test jobs: build-ruby-2_3: @@ -144,8 +138,6 @@ jobs: steps: - regenerate_and_run_tests: project_path: "hps-behat" - config_file: "behat.conf" - test_command: "vendor/bin/behat" hps-behave: docker: @@ -155,8 +147,6 @@ jobs: steps: - regenerate_and_run_tests: project_path: "hps-behave" - config_file: "behave.conf" - test_command: "behave" hps-cucumber-groovy: docker: @@ -166,8 +156,6 @@ jobs: steps: - regenerate_and_run_tests: project_path: "hps-cucumber-groovy" - config_file: "cucumber-groovy.conf" - test_command: "mvn test" hps-cucumber-java: docker: @@ -177,8 +165,15 @@ jobs: steps: - regenerate_and_run_tests: project_path: "hps-cucumber-java" - config_file: "cucumber-java.conf" - test_command: "mvn test" + + hps-cucumber-javascript: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-cucumber-javascript" hps-groovy-spock: docker: @@ -188,8 +183,6 @@ jobs: steps: - regenerate_and_run_tests: project_path: "hps-groovy-spock" - config_file: "groovy-spock.conf" - test_command: "mvn test" hps-java-junit: docker: @@ -199,8 +192,6 @@ jobs: steps: - regenerate_and_run_tests: project_path: "hps-java-junit" - config_file: "junit.conf" - test_command: "mvn test" hps-java-testng: docker: @@ -210,8 +201,15 @@ jobs: steps: - regenerate_and_run_tests: project_path: "hps-java-testng" - config_file: "java-testng.conf" - test_command: "mvn test" + + hps-javascript-mocha: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-javascript-mocha" hps-jbehave: docker: @@ -221,8 +219,6 @@ jobs: steps: - regenerate_and_run_tests: project_path: "hps-jbehave" - config_file: "jbehave.conf" - test_command: "mvn integration-test" hps-python-unittest: docker: @@ -232,8 +228,6 @@ jobs: steps: - regenerate_and_run_tests: project_path: "hps-python-unittest" - config_file: "python-unittest.conf" - test_command: "bin/test" workflows: version: 2 @@ -247,30 +241,47 @@ workflows: run_samples: jobs: - install-hiptest-publisher + - hps-behat: requires: - install-hiptest-publisher + - hps-behave: requires: - install-hiptest-publisher - - hps-python-unittest: - requires: - - install-hiptest-publisher + - hps-cucumber-groovy: requires: - install-hiptest-publisher + - hps-cucumber-java: requires: - install-hiptest-publisher + + - hps-cucumber-javascript: + requires: + - install-hiptest-publisher + - hps-groovy-spock: requires: - install-hiptest-publisher + - hps-java-junit: requires: - install-hiptest-publisher + - hps-java-testng: requires: - install-hiptest-publisher + + - hps-javascript-mocha: + requires: + - install-hiptest-publisher + - hps-jbehave: requires: - install-hiptest-publisher + + - hps-python-unittest: + requires: + - install-hiptest-publisher From a2dd04988fc315ff4f46d9559378a11c46c5227f Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Wed, 31 Jul 2019 10:26:08 +0200 Subject: [PATCH 25/38] Add qUnit and Jasmine in CI --- .circleci/config.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 73f2639b..65fbb1d8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -202,6 +202,15 @@ jobs: - regenerate_and_run_tests: project_path: "hps-java-testng" + hps-javascript-jasmine: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-javascript-jasmine" + hps-javascript-mocha: docker: - image: hiptest/hiptest-publisher-samples @@ -211,6 +220,15 @@ jobs: - regenerate_and_run_tests: project_path: "hps-javascript-mocha" + hps-javascript-qunit: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-javascript-qunit" + hps-jbehave: docker: - image: hiptest/hiptest-publisher-samples From 9b44be502054308695d84bb45abb0f9f3712e046 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Fri, 2 Aug 2019 14:51:11 +0200 Subject: [PATCH 26/38] Add some more smaples to run --- .circleci/config.yml | 78 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 65fbb1d8..aab9aa11 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -148,6 +148,15 @@ jobs: - regenerate_and_run_tests: project_path: "hps-behave" + hps-cucumber-ruby: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-cucumber-ruby" + hps-cucumber-groovy: docker: - image: hiptest/hiptest-publisher-samples @@ -175,6 +184,15 @@ jobs: - regenerate_and_run_tests: project_path: "hps-cucumber-javascript" + hps-cucumber-typescript: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-cucumber-typescript" + hps-groovy-spock: docker: - image: hiptest/hiptest-publisher-samples @@ -238,6 +256,15 @@ jobs: - regenerate_and_run_tests: project_path: "hps-jbehave" + hps-protractor: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-protractor" + hps-python-unittest: docker: - image: hiptest/hiptest-publisher-samples @@ -247,6 +274,33 @@ jobs: - regenerate_and_run_tests: project_path: "hps-python-unittest" + hps-robotframework: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-robotframework" + + hps-ruby-minitest: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-ruby-minitest" + + hps-ruby-rspec: + docker: + - image: hiptest/hiptest-publisher-samples + working_directory: ~/repo + + steps: + - regenerate_and_run_tests: + project_path: "hps-ruby-rspec" + workflows: version: 2 # build: @@ -268,6 +322,10 @@ workflows: requires: - install-hiptest-publisher + - hps-cucumber-ruby: + requires: + - install-hiptest-publisher + - hps-cucumber-groovy: requires: - install-hiptest-publisher @@ -280,6 +338,10 @@ workflows: requires: - install-hiptest-publisher + - hps-cucumber-typescript: + requires: + - install-hiptest-publisher + - hps-groovy-spock: requires: - install-hiptest-publisher @@ -300,6 +362,22 @@ workflows: requires: - install-hiptest-publisher + - hps-protractor: + requires: + - install-hiptest-publisher + - hps-python-unittest: requires: - install-hiptest-publisher + + - hps-robotframework: + requires: + - install-hiptest-publisher + + - hps-ruby-minitest: + requires: + - install-hiptest-publisher + + - hps-ruby-rspec: + requires: + - install-hiptest-publisher From 7cbaa52a00364c8b02ad092e7166da859a8b863e Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Thu, 26 Sep 2019 10:10:21 +0200 Subject: [PATCH 27/38] Try to use default image to run samples --- .circleci/config.yml | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index aab9aa11..30e4ada2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,6 +45,16 @@ commands: - v1-gem-cache-{{ arch }}-{{ .Branch }}- - v1-gem-cache-{{ arch }}- + install_ruby: + description: "Install Ruby" + steps: + - run: + name: Install hiptest-publisher + command: | + sudo apt-get update + sudo apt-get install ruby ruby-dev + sudo gem install hiptest-publisher + install_hiptest_publisher: description: "Install Hiptest publisher" steps: @@ -71,6 +81,26 @@ commands: make generate_tests make test + run_sample: + description: "Run hps repo with local hisptest-publisher" + parameters: + project_path: + type: string + default: "" + steps: + - checkout + - install_ruby + - install_hiptest_publisher + - run: + name: Checkout and run sample + command: | + mkdir -p hps + pushd hps + git clone https://github.com/hiptest/<< parameters.project_path >> + pushd << parameters.project_path >> + make generate_tests + make test + jobs: build-ruby-2_3: docker: @@ -132,11 +162,11 @@ jobs: hps-behat: docker: - - image: hiptest/hiptest-publisher-samples + - image: circleci/python:2.7 working_directory: ~/repo steps: - - regenerate_and_run_tests: + - run_sample: project_path: "hps-behat" hps-behave: From a93647e7c5602538944fce75c01d720c0dfaee20 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Thu, 26 Sep 2019 10:22:11 +0200 Subject: [PATCH 28/38] Fix copy/paste --- .circleci/config.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 30e4ada2..3d29edc8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -49,11 +49,10 @@ commands: description: "Install Ruby" steps: - run: - name: Install hiptest-publisher + name: Install Ruby command: | sudo apt-get update sudo apt-get install ruby ruby-dev - sudo gem install hiptest-publisher install_hiptest_publisher: description: "Install Hiptest publisher" @@ -162,7 +161,7 @@ jobs: hps-behat: docker: - - image: circleci/python:2.7 + - image: circleci/php:7.2 working_directory: ~/repo steps: @@ -171,11 +170,11 @@ jobs: hps-behave: docker: - - image: hiptest/hiptest-publisher-samples + - image: circleci/python:2.7 working_directory: ~/repo steps: - - regenerate_and_run_tests: + - run_sample: project_path: "hps-behave" hps-cucumber-ruby: From 42612163a42331b98d4bbe666f687ca6b293100c Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Thu, 26 Sep 2019 10:32:31 +0200 Subject: [PATCH 29/38] Disable samples with old method --- .circleci/config.yml | 102 ++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 54 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d29edc8..05b0ad48 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,6 +53,7 @@ commands: command: | sudo apt-get update sudo apt-get install ruby ruby-dev + gem install bundler install_hiptest_publisher: description: "Install Hiptest publisher" @@ -341,72 +342,65 @@ workflows: run_samples: jobs: - - install-hiptest-publisher + - hps-behat + - hps-behave - - hps-behat: - requires: - - install-hiptest-publisher + # - hps-cucumber-ruby: + # requires: + # - install-hiptest-publisher - - hps-behave: - requires: - - install-hiptest-publisher + # - hps-cucumber-groovy: + # requires: + # - install-hiptest-publisher - - hps-cucumber-ruby: - requires: - - install-hiptest-publisher + # - hps-cucumber-java: + # requires: + # - install-hiptest-publisher - - hps-cucumber-groovy: - requires: - - install-hiptest-publisher + # - hps-cucumber-javascript: + # requires: + # - install-hiptest-publisher - - hps-cucumber-java: - requires: - - install-hiptest-publisher + # - hps-cucumber-typescript: + # requires: + # - install-hiptest-publisher - - hps-cucumber-javascript: - requires: - - install-hiptest-publisher + # - hps-groovy-spock: + # requires: + # - install-hiptest-publisher - - hps-cucumber-typescript: - requires: - - install-hiptest-publisher + # - hps-java-junit: + # requires: + # - install-hiptest-publisher - - hps-groovy-spock: - requires: - - install-hiptest-publisher + # - hps-java-testng: + # requires: + # - install-hiptest-publisher - - hps-java-junit: - requires: - - install-hiptest-publisher + # - hps-javascript-mocha: + # requires: + # - install-hiptest-publisher - - hps-java-testng: - requires: - - install-hiptest-publisher + # - hps-jbehave: + # requires: + # - install-hiptest-publisher - - hps-javascript-mocha: - requires: - - install-hiptest-publisher + # - hps-protractor: + # requires: + # - install-hiptest-publisher - - hps-jbehave: - requires: - - install-hiptest-publisher + # - hps-python-unittest: + # requires: + # - install-hiptest-publisher - - hps-protractor: - requires: - - install-hiptest-publisher + # - hps-robotframework: + # requires: + # - install-hiptest-publisher - - hps-python-unittest: - requires: - - install-hiptest-publisher + # - hps-ruby-minitest: + # requires: + # - install-hiptest-publisher - - hps-robotframework: - requires: - - install-hiptest-publisher - - - hps-ruby-minitest: - requires: - - install-hiptest-publisher - - - hps-ruby-rspec: - requires: - - install-hiptest-publisher + # - hps-ruby-rspec: + # requires: + # - install-hiptest-publisher From 2239fb9daa3336669643ab43424074fd2a92403e Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Thu, 26 Sep 2019 10:33:46 +0200 Subject: [PATCH 30/38] Use sudo to add bundler --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 05b0ad48..606e680b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,7 +53,7 @@ commands: command: | sudo apt-get update sudo apt-get install ruby ruby-dev - gem install bundler + sudo gem install bundler install_hiptest_publisher: description: "Install Hiptest publisher" From 014089371fc3b1ac7863315973756a36b60cabb3 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Thu, 26 Sep 2019 10:35:35 +0200 Subject: [PATCH 31/38] Specify version of bundler for samples --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 606e680b..41a15b2d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,7 +53,7 @@ commands: command: | sudo apt-get update sudo apt-get install ruby ruby-dev - sudo gem install bundler + sudo gem install bundler -v 1.17.3 install_hiptest_publisher: description: "Install Hiptest publisher" From 5f576f042e365495298743db84caa6d30c7d23ab Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Thu, 26 Sep 2019 10:40:07 +0200 Subject: [PATCH 32/38] Also use sudo to install hiptest-publisher --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 41a15b2d..8c4ebabd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -62,7 +62,7 @@ commands: name: Install hiptest-publisher command: | bundle install - bundle exec rake install + sudo bundle exec rake install regenerate_and_run_tests: description: "Regenerate tests with hiptest-publisher and run them" From 8bcaacbc28938216d111a93c12ff28bd070d671f Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Thu, 26 Sep 2019 11:01:53 +0200 Subject: [PATCH 33/38] Ensure pre-requisites are installed --- .circleci/config.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8c4ebabd..672f8c25 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,6 +64,13 @@ commands: bundle install sudo bundle exec rake install + install_prerequisites: + description: "Install sample pre-requisites" + steps: + - run: + name: Install pre-requisites + command: sudo make install_prerequisites + regenerate_and_run_tests: description: "Regenerate tests with hiptest-publisher and run them" parameters: @@ -89,6 +96,7 @@ commands: default: "" steps: - checkout + - install_prerequisites - install_ruby - install_hiptest_publisher - run: From 6beaef915a238864a3ce4927a68807ec9132b8ee Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Thu, 26 Sep 2019 11:16:14 +0200 Subject: [PATCH 34/38] Fix CircleCI config --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 672f8c25..f07741b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -68,8 +68,9 @@ commands: description: "Install sample pre-requisites" steps: - run: - name: Install pre-requisites - command: sudo make install_prerequisites + name: Install pre-requisites + command: | + sudo make install_prerequisites regenerate_and_run_tests: description: "Regenerate tests with hiptest-publisher and run them" From ea58a80e00fe9c001cf783491045b891a353450b Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Thu, 26 Sep 2019 11:22:05 +0200 Subject: [PATCH 35/38] Install pre-requisites in the correct repository ... --- .circleci/config.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f07741b0..0c15d142 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,14 +64,6 @@ commands: bundle install sudo bundle exec rake install - install_prerequisites: - description: "Install sample pre-requisites" - steps: - - run: - name: Install pre-requisites - command: | - sudo make install_prerequisites - regenerate_and_run_tests: description: "Regenerate tests with hiptest-publisher and run them" parameters: @@ -97,7 +89,6 @@ commands: default: "" steps: - checkout - - install_prerequisites - install_ruby - install_hiptest_publisher - run: @@ -107,6 +98,7 @@ commands: pushd hps git clone https://github.com/hiptest/<< parameters.project_path >> pushd << parameters.project_path >> + sudo make install_prerequisites make generate_tests make test From 691c14ee586dee9e4df847aebbc8e2f59cc44933 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Thu, 26 Sep 2019 11:27:01 +0200 Subject: [PATCH 36/38] Add pre-requisites without sudo --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0c15d142..54fc4b98 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -98,7 +98,7 @@ commands: pushd hps git clone https://github.com/hiptest/<< parameters.project_path >> pushd << parameters.project_path >> - sudo make install_prerequisites + make install_prerequisites make generate_tests make test From 7d88619db2e794bb2e8c03e9a758ab6fc57c1356 Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Thu, 26 Sep 2019 11:35:31 +0200 Subject: [PATCH 37/38] Try cucumber-ruby with new workflow --- .circleci/config.yml | 42 ++++-------------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 54fc4b98..555929b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,25 +64,8 @@ commands: bundle install sudo bundle exec rake install - regenerate_and_run_tests: - description: "Regenerate tests with hiptest-publisher and run them" - parameters: - project_path: - type: string - default: "" - steps: - - checkout - - restore_bundler_cache - - install_hiptest_publisher - - run: - name: Generate tests - command: | - cd /hiptest-publisher-samples/hps/<< parameters.project_path >> - make generate_tests - make test - run_sample: - description: "Run hps repo with local hisptest-publisher" + description: "Run hps repo with local hiptest-publisher" parameters: project_path: type: string @@ -143,24 +126,6 @@ jobs: # Hiptest publisher samples jobs # ############################################################################# - install-hiptest-publisher: - docker: - - image: hiptest/hiptest-publisher-samples - - working_directory: ~/repo - steps: - - checkout - - restore_bundler_cache - - run: - name: Install hiptest-publisher - command: | - bundle install && bundle clean --force - - save_cache: - paths: - - ~/.bundle - key: v1-gem-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - install_hiptest_publisher - hps-behat: docker: - image: circleci/php:7.2 @@ -181,11 +146,11 @@ jobs: hps-cucumber-ruby: docker: - - image: hiptest/hiptest-publisher-samples + - image: circleci/ruby:2.6 working_directory: ~/repo steps: - - regenerate_and_run_tests: + - run_sample: project_path: "hps-cucumber-ruby" hps-cucumber-groovy: @@ -345,6 +310,7 @@ workflows: jobs: - hps-behat - hps-behave + - hps-cucumber-ruby # - hps-cucumber-ruby: # requires: From d201dfc895bf16afc43412f2891d7b0db97bec0d Mon Sep 17 00:00:00 2001 From: Vincent Pretre Date: Mon, 30 Sep 2019 14:03:17 +0200 Subject: [PATCH 38/38] Try different docker image to run hps-cucumber-ruby --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 555929b9..7ee6433c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -146,7 +146,7 @@ jobs: hps-cucumber-ruby: docker: - - image: circleci/ruby:2.6 + - image: circleci/ruby:2.6.2 working_directory: ~/repo steps: