diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 68e3e63d8..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,158 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@2.0.0 - node: circleci/node@5.1.0 - browser-tools: circleci/browser-tools@1.4.4 -aliases: - - &ruby_node_browsers_docker_image - - image: cimg/ruby:3.3.0-browsers - environment: - PGHOST: localhost - PGUSER: untitled_application - RAILS_ENV: test - - &postgres_docker_image - - image: circleci/postgres - environment: - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_DB: untitled_application_test - POSTGRES_USER: untitled_application - - &wait_for_docker - # We run this because the DB might not be available for a while due to a race condition. - run: dockerize -wait tcp://localhost:5432 -timeout 1m -jobs: - 'Local Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - working_directory: ~/project - steps: - - checkout: - path: ~/project/local/bullet_train-core - - browser-tools/install-chrome: - chrome-version: "116.0.5845.96" # TODO: remove -> https://github.com/CircleCI-Public/browser-tools-orb/issues/75 - replace-existing: true # TODO: remove -> https://github.com/CircleCI-Public/browser-tools-orb/issues/75 - - browser-tools/install-chromedriver - - - run: local/bullet_train-core/bin/checkout-and-link-starter-repo-for-core-tests - - - ruby/install-deps: - clean-bundle: true - - node/install-packages: - pkg-manager: yarn - - run: yarn build:css - - run: yarn build - - *wait_for_docker - - run: - name: Run unit tests - command: ./local/bullet_train-core/bin/test-core-gems - - 'Local Standard Ruby': - docker: - - <<: *ruby_node_browsers_docker_image - steps: - - checkout - - ruby/install-deps: - clean-bundle: true - - run: - name: Check Standard Ruby - command: bundle exec standardrb - - 'Starter Repo Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - working_directory: tmp/starter - parallelism: 2 - steps: - - checkout: - path: ~/project - - browser-tools/install-chrome: - chrome-version: "116.0.5845.96" # TODO: remove -> https://github.com/CircleCI-Public/browser-tools-orb/issues/75 - replace-existing: true # TODO: remove -> https://github.com/CircleCI-Public/browser-tools-orb/issues/75 - - browser-tools/install-chromedriver - - - run: ../../bin/checkout-and-link-starter-repo - - - ruby/install-deps: - clean-bundle: true - - node/install-packages: - pkg-manager: yarn - - run: yarn build:css - - run: yarn build - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - RAILS_ENV: test - KNAPSACK_PRO_CI_NODE_TOTAL: 2 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - - 'Starter Repo Minitest for Super Scaffolding': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - working_directory: tmp/starter - parallelism: 7 - steps: - - checkout: - path: ~/project - - browser-tools/install-chrome: - chrome-version: "116.0.5845.96" # TODO: remove -> https://github.com/CircleCI-Public/browser-tools-orb/issues/75 - replace-existing: true # TODO: remove -> https://github.com/CircleCI-Public/browser-tools-orb/issues/75 - - browser-tools/install-chromedriver - - - run: ../../bin/checkout-and-link-starter-repo - - - ruby/install-deps: - clean-bundle: true - - node/install-packages: - pkg-manager: yarn - - run: yarn build:css - - run: yarn build - - - *wait_for_docker - - - run: "bundle config unset deployment" # Remove the lock from ruby/install-deps - - run: "bundle add spring" - - run: - name: 'Setup Super Scaffolding System Test' - command: "bundle exec test/bin/setup-super-scaffolding-system-test" - - run: - name: 'Run Super Scaffolding Test' - command: "bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb" - - run: - name: 'Run Super Scaffolding Partial Test' - command: 'bundle exec rails test test/system/super_scaffolding/super_scaffolding_partial_test.rb' - -workflows: - version: 2 - build: - jobs: - - 'Local Standard Ruby' - - 'Local Minitest' - - 'Starter Repo Minitest' - - 'Starter Repo Minitest for Super Scaffolding' diff --git a/bin/checkout-and-link-starter-repo b/bin/checkout-and-link-starter-repo deleted file mode 100755 index 35c6edfac..000000000 --- a/bin/checkout-and-link-starter-repo +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/env bash - -# Default to the main branch if we don't find a matching branch on the starter repository. -STARTER_REPO_BRANCH="main" - -# Look for a matching branch on the starter repository when running tests on CircleCI. -CI_BRANCH=$CIRCLE_BRANCH -if [[ -v CI_BRANCH ]] -then - BRANCH_RESPONSE=$(curl --verbose https://api.github.com/repos/bullet-train-co/bullet_train/branches/$CI_BRANCH) - - echo "Branch response ====================" - echo $BRANCH_RESPONSE - - # If the branch is missing in the repo the response will not contain the branch name - if echo $BRANCH_RESPONSE | grep "$CIRCLE_BRANCH"; then - STARTER_REPO_BRANCH=$CI_BRANCH - fi -fi - -echo "Cloning from ${STARTER_REPO_BRANCH}..." -git clone -b $STARTER_REPO_BRANCH --depth 1 https://github.com/bullet-train-co/bullet_train.git . - -# This searches two directories up because we're in tmp/starter (the CI working directory). -packages_string=$(find ./../../ -name 'bullet_train*.gemspec' | grep -o 'bullet_train.*' | sed "s/\/.*//") -readarray -t packages <<<"$packages_string" # Convert to an array. - -for package in "${packages[@]}" -do - : - grep -v "gem \"$package\"" Gemfile > Gemfile.tmp - mv Gemfile.tmp Gemfile - echo "gem \"$package\", path: \"../../$package\"" >> Gemfile -done - -updates="${packages[@]}" -bundle lock --conservative --update $updates - -packages=( - "bullet_train" - "bullet_train-sortable" -) - -echo "yalc dir ======" -npx yalc dir - -starting_dir=$PWD - -for package in "${packages[@]}" -do - : - npm_package=${package/_/-} - echo "linking package: $package" - echo "npm package: $npm_package" - - cd ../../$package - yarn install - yarn build - npx yalc publish - - cd $starting_dir - npx yalc add @bullet-train/$npm_package -done - - -# For some reason the fields package is called bullet-train/field and doesn't match the pattern for other packages. -# If it did match other packages it would be bullet-train/bullet-train-fields. -# Since it's different we have to treat it special. It would be nice to standardize, but that's likely to have -# impacts beyond just fixing CI, so I'm doing the messy thing for now. - -package="bullet_train-fields" -npm_package="fields" -echo "linking package: $package" -echo "npm package: $npm_package" - -cd ../../$package -yarn install -yarn build -npx yalc publish - -cd $starting_dir -npx yalc add @bullet-train/$npm_package - - -cat package.json - - -# We do this here becausue the node/install-packages step complains about -# needing to modify the lock file. - -yarn install - - diff --git a/bin/checkout-and-link-starter-repo-for-core-tests b/bin/checkout-and-link-starter-repo-for-core-tests deleted file mode 100755 index ea62aefde..000000000 --- a/bin/checkout-and-link-starter-repo-for-core-tests +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env bash - -# Default to the main branch if we don't find a matching branch on the starter repository. -STARTER_REPO_BRANCH="main" - -# Look for a matching branch on the starter repository when running tests on CircleCI. -CI_BRANCH=$CIRCLE_BRANCH -if [[ -v CI_BRANCH ]] -then - BRANCH_RESPONSE=$(curl --verbose https://api.github.com/repos/bullet-train-co/bullet_train/branches/$CI_BRANCH) - - echo "Branch response ====================" - echo $BRANCH_RESPONSE - - # If the branch is missing in the repo the response will not contain the branch name - if echo $BRANCH_RESPONSE | grep "$CIRCLE_BRANCH"; then - STARTER_REPO_BRANCH=$CI_BRANCH - fi -fi - -echo "Cloning from ${STARTER_REPO_BRANCH}..." -git clone -b $STARTER_REPO_BRANCH --depth 1 https://github.com/bullet-train-co/bullet_train.git gem-test -shopt -s dotglob # Ensure the following glob picks up dot files like .ruby-version. -mv gem-test/* . -rm -rf gem-test - -# TODO: Maybe generate this list automatically based on the subdirectories in core that contain a .gemspec? -packages=( - "bullet_train" - "bullet_train-api" - "bullet_train-fields" - "bullet_train-has_uuid" - "bullet_train-incoming_webhooks" - "bullet_train-integrations" - "bullet_train-integrations-stripe" - "bullet_train-obfuscates_id" - "bullet_train-outgoing_webhooks" - "bullet_train-roles" - "bullet_train-scope_questions" - "bullet_train-scope_validator" - "bullet_train-sortable" - "bullet_train-super_load_and_authorize_resource" - "bullet_train-super_scaffolding" - "bullet_train-themes" - "bullet_train-themes-light" - "bullet_train-themes-tailwind_css" -) - -for package in "${packages[@]}" -do - : - grep -v "gem \"$package\"" Gemfile > Gemfile.tmp - mv Gemfile.tmp Gemfile - echo "gem \"$package\", path: \"local/bullet_train-core/$package\"" >> Gemfile -done - -updates="${packages[@]}" -bundle lock --conservative --update $updates - -packages=( - "bullet_train" - "bullet_train-sortable" -) - -echo "yalc dir ======" -npx yalc dir - -starting_dir=$PWD - -for package in "${packages[@]}" -do - : - npm_package=${package/_/-} - echo "linking package: $package" - echo "npm package: $npm_package" - - cd local/bullet_train-core/$package - yarn install - yarn build - npx yalc publish - - cd $starting_dir - npx yalc add @bullet-train/$npm_package -done - - -# For some reason the fields package is called bullet-train/field and doesn't match the pattern for other packages. -# If it did match other packages it would be bullet-train/bullet-train-fields. -# Since it's different we have to treat it special. It would be nice to standardize, but that's likely to have -# impacts beyond just fixing CI, so I'm doing the messy thing for now. - -package="bullet_train-fields" -npm_package="fields" -echo "linking package: $package" -echo "npm package: $npm_package" - -cd local/bullet_train-core/$package -yarn install -yarn build -npx yalc publish - -cd $starting_dir -npx yalc add @bullet-train/$npm_package - - -cat package.json - - -# We do this here becausue the node/install-packages step complains about -# needing to modify the lock file. - -yarn install diff --git a/bullet_train-api/.circleci/config.yml b/bullet_train-api/.circleci/config.yml deleted file mode 100644 index f0a2a17d4..000000000 --- a/bullet_train-api/.circleci/config.yml +++ /dev/null @@ -1,188 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@0.1.2 - browser-tools: circleci/browser-tools@1.1 -aliases: - - &restore_bundler_cache - name: Restore Bundler cache - keys: - - gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-cache-v1-{{ .Branch }}- - - gem-cache-v1- - - &restore_yarn_cache - name: Restore Yarn cache - keys: - - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v1-{{ .Branch }}- - - yarn-packages- - - &save_bundle_cache - name: Save Bundle cache - key: gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - &save_yarn_cache - name: Save Yarn cache - key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules - - &ruby_node_browsers_docker_image - - image: cimg/ruby:3.2.2-browsers - environment: - PGHOST: localhost - PGUSER: untitled_application - RAILS_ENV: test - - &postgres_docker_image - - image: circleci/postgres - environment: - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_DB: untitled_application_test - POSTGRES_USER: untitled_application - - &wait_for_docker - # We run this because the DB might not be available for a while due to a race condition. - run: dockerize -wait tcp://localhost:5432 -timeout 1m -jobs: - 'Local Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - # Install dependencies - - run: "bundle install" - - run: "bundle clean --force" - - run: "yarn install" - - *wait_for_docker - - run: - name: Run unit tests - command: bundle exec rails test - - 'Local Standard Ruby': - docker: - - <<: *ruby_node_browsers_docker_image - steps: - - checkout - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - ruby/bundle-install - - run: bundle clean --force - - run: yarn install - - # # Save dependency caches - # # We only do this as part of this job, because it's time consuming and we don't want it to slow down test runners. - # - save_cache: *save_bundle_cache - # - save_cache: *save_yarn_cache - - - run: - name: Check Standard Ruby - command: bundle exec standardrb - - 'Starter Repo Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - parallelism: 16 - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-api\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-api\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: | - cd tmp/starter - export RAILS_ENV=test - bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - KNAPSACK_PRO_CI_NODE_TOTAL: 16 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - - 'Starter Repo Minitest for Super Scaffolding': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-api\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-api\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: "cd tmp/starter && bundle add spring" - - run: - name: 'Setup Super Scaffolding System Test' - command: "cd tmp/starter && bundle exec test/bin/setup-super-scaffolding-system-test" - - run: - name: 'Run Super Scaffolding Test' - command: "cd tmp/starter && bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb" - -workflows: - version: 2 - build: - jobs: - # - 'Local Minitest' - - 'Local Standard Ruby' - - 'Starter Repo Minitest' - - 'Starter Repo Minitest for Super Scaffolding' diff --git a/bullet_train-fields/.circleci/config.yml b/bullet_train-fields/.circleci/config.yml deleted file mode 100644 index e6394c308..000000000 --- a/bullet_train-fields/.circleci/config.yml +++ /dev/null @@ -1,189 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@0.1.2 - browser-tools: circleci/browser-tools@1.1 -aliases: - - &restore_bundler_cache - name: Restore Bundler cache - keys: - - gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-cache-v1-{{ .Branch }}- - - gem-cache-v1- - - &restore_yarn_cache - name: Restore Yarn cache - keys: - - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v1-{{ .Branch }}- - - yarn-packages- - - &save_bundle_cache - name: Save Bundle cache - key: gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - &save_yarn_cache - name: Save Yarn cache - key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules - - &ruby_node_browsers_docker_image - - image: cimg/ruby:3.2.2-browsers - environment: - PGHOST: localhost - PGUSER: untitled_application - RAILS_ENV: test - - &postgres_docker_image - - image: circleci/postgres - environment: - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_DB: untitled_application_test - POSTGRES_USER: untitled_application - - &wait_for_docker - # We run this because the DB might not be available for a while due to a race condition. - run: dockerize -wait tcp://localhost:5432 -timeout 1m -jobs: - 'Local Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - # Install dependencies - - run: "bundle install" - - run: "bundle clean --force" - - run: "yarn install" - - *wait_for_docker - - run: - name: Run unit tests - command: bundle exec rails test - - 'Local Standard Ruby': - docker: - - <<: *ruby_node_browsers_docker_image - steps: - - checkout - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - ruby/bundle-install - - run: bundle clean --force - - run: yarn install - - # # Save dependency caches - # # We only do this as part of this job, because it's time consuming and we don't want it to slow down test runners. - # - save_cache: *save_bundle_cache - # - save_cache: *save_yarn_cache - - - run: - name: Check Standard Ruby - command: bundle exec standardrb - - 'Starter Repo Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - parallelism: 16 - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-fields\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-fields\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: | - cd tmp/starter - export RAILS_ENV=test - SKIP_RESOLVE_TEST=1 bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - KNAPSACK_PRO_CI_NODE_TOTAL: 16 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - - 'Starter Repo Minitest for Super Scaffolding': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-fields\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-fields\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: "cd tmp/starter && bundle add spring" - - run: - name: 'Setup Super Scaffolding System Test' - command: "cd tmp/starter && bundle exec test/bin/setup-super-scaffolding-system-test" - - run: - name: 'Run Super Scaffolding Test' - command: "cd tmp/starter && bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb" - -workflows: - version: 2 - build: - jobs: - # TODO Figure out why this isn't passing. - # - 'Local Minitest' - - 'Local Standard Ruby' - - 'Starter Repo Minitest' - - 'Starter Repo Minitest for Super Scaffolding' diff --git a/bullet_train-outgoing_webhooks/.circleci/config.yml b/bullet_train-outgoing_webhooks/.circleci/config.yml deleted file mode 100644 index 00147988b..000000000 --- a/bullet_train-outgoing_webhooks/.circleci/config.yml +++ /dev/null @@ -1,189 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@0.1.2 - browser-tools: circleci/browser-tools@1.1 -aliases: - - &restore_bundler_cache - name: Restore Bundler cache - keys: - - gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-cache-v1-{{ .Branch }}- - - gem-cache-v1- - - &restore_yarn_cache - name: Restore Yarn cache - keys: - - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v1-{{ .Branch }}- - - yarn-packages- - - &save_bundle_cache - name: Save Bundle cache - key: gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - &save_yarn_cache - name: Save Yarn cache - key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules - - &ruby_node_browsers_docker_image - - image: cimg/ruby:3.2.2-browsers - environment: - PGHOST: localhost - PGUSER: untitled_application - RAILS_ENV: test - - &postgres_docker_image - - image: circleci/postgres - environment: - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_DB: untitled_application_test - POSTGRES_USER: untitled_application - - &wait_for_docker - # We run this because the DB might not be available for a while due to a race condition. - run: dockerize -wait tcp://localhost:5432 -timeout 1m -jobs: - 'Local Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - # Install dependencies - - run: "bundle install" - - run: "bundle clean --force" - - run: "yarn install" - - *wait_for_docker - - run: - name: Run unit tests - command: bundle exec rails test - - 'Local Standard Ruby': - docker: - - <<: *ruby_node_browsers_docker_image - steps: - - checkout - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - ruby/bundle-install - - run: bundle clean --force - - run: yarn install - - # # Save dependency caches - # # We only do this as part of this job, because it's time consuming and we don't want it to slow down test runners. - # - save_cache: *save_bundle_cache - # - save_cache: *save_yarn_cache - - - run: - name: Check Standard Ruby - command: bundle exec standardrb - - 'Starter Repo Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - parallelism: 16 - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-outgoing_webhooks\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-outgoing_webhooks\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: | - cd tmp/starter - export RAILS_ENV=test - SKIP_RESOLVE_TEST=1 bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - KNAPSACK_PRO_CI_NODE_TOTAL: 16 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - - 'Starter Repo Minitest for Super Scaffolding': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-outgoing_webhooks\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-outgoing_webhooks\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: "cd tmp/starter && bundle add spring" - - run: - name: 'Setup Super Scaffolding System Test' - command: "cd tmp/starter && bundle exec test/bin/setup-super-scaffolding-system-test" - - run: - name: 'Run Super Scaffolding Test' - command: "cd tmp/starter && bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb" - -workflows: - version: 2 - build: - jobs: - # TODO Figure out why this isn't passing. - # - 'Local Minitest' - - 'Local Standard Ruby' - - 'Starter Repo Minitest' - - 'Starter Repo Minitest for Super Scaffolding' diff --git a/bullet_train-roles/.circleci/config.yml b/bullet_train-roles/.circleci/config.yml deleted file mode 100644 index 6da3eadf2..000000000 --- a/bullet_train-roles/.circleci/config.yml +++ /dev/null @@ -1,188 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@0.1.2 - browser-tools: circleci/browser-tools@1.1 -aliases: - - &restore_bundler_cache - name: Restore Bundler cache - keys: - - gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-cache-v1-{{ .Branch }}- - - gem-cache-v1- - - &restore_yarn_cache - name: Restore Yarn cache - keys: - - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v1-{{ .Branch }}- - - yarn-packages- - - &save_bundle_cache - name: Save Bundle cache - key: gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - &save_yarn_cache - name: Save Yarn cache - key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules - - &ruby_node_browsers_docker_image - - image: cimg/ruby:3.2.2-browsers - environment: - PGHOST: localhost - PGUSER: untitled_application - RAILS_ENV: test - - &postgres_docker_image - - image: circleci/postgres - environment: - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_DB: untitled_application_test - POSTGRES_USER: untitled_application - - &wait_for_docker - # We run this because the DB might not be available for a while due to a race condition. - run: dockerize -wait tcp://localhost:5432 -timeout 1m -jobs: - 'Local Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - # Install dependencies - - run: "bundle install" - - run: "bundle clean --force" - - run: "yarn install" - - *wait_for_docker - - run: - name: Run unit tests - command: bundle exec rails test - - 'Local Standard Ruby': - docker: - - <<: *ruby_node_browsers_docker_image - steps: - - checkout - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - ruby/bundle-install - - run: bundle clean --force - - run: yarn install - - # # Save dependency caches - # # We only do this as part of this job, because it's time consuming and we don't want it to slow down test runners. - # - save_cache: *save_bundle_cache - # - save_cache: *save_yarn_cache - - - run: - name: Check Standard Ruby - command: bundle exec standardrb - - 'Starter Repo Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - parallelism: 16 - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-roles\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-roles\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: | - cd tmp/starter - export RAILS_ENV=test - bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - KNAPSACK_PRO_CI_NODE_TOTAL: 16 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - - 'Starter Repo Minitest for Super Scaffolding': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-roles\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-roles\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: - name: 'Setup Super Scaffolding System Test' - command: "cd tmp/starter && bundle exec test/bin/setup-super-scaffolding-system-test" - - run: - name: 'Run Super Scaffolding Test' - command: "cd tmp/starter && bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb" - -workflows: - version: 2 - build: - jobs: - - 'Local Minitest' - - 'Local Standard Ruby' - - 'Starter Repo Minitest' - # TODO Get this passing. - # - 'Starter Repo Minitest for Super Scaffolding' diff --git a/bullet_train-scope_validator/.circleci/config.yml b/bullet_train-scope_validator/.circleci/config.yml deleted file mode 100644 index 51100ea8b..000000000 --- a/bullet_train-scope_validator/.circleci/config.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: 2.1 -jobs: - build: - docker: - - image: ruby:3.0.2 - steps: - - checkout - - run: - name: Run the default task - command: | - gem install bundler -v 2.3.4 - bundle install - bundle exec rake diff --git a/bullet_train-sortable/.circleci/config.yml b/bullet_train-sortable/.circleci/config.yml deleted file mode 100644 index 0837c19fa..000000000 --- a/bullet_train-sortable/.circleci/config.yml +++ /dev/null @@ -1,189 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@0.1.2 - browser-tools: circleci/browser-tools@1.1 -aliases: - - &restore_bundler_cache - name: Restore Bundler cache - keys: - - gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-cache-v1-{{ .Branch }}- - - gem-cache-v1- - - &restore_yarn_cache - name: Restore Yarn cache - keys: - - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v1-{{ .Branch }}- - - yarn-packages- - - &save_bundle_cache - name: Save Bundle cache - key: gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - &save_yarn_cache - name: Save Yarn cache - key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules - - &ruby_node_browsers_docker_image - - image: cimg/ruby:3.2.2-browsers - environment: - PGHOST: localhost - PGUSER: untitled_application - RAILS_ENV: test - - &postgres_docker_image - - image: circleci/postgres - environment: - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_DB: untitled_application_test - POSTGRES_USER: untitled_application - - &wait_for_docker - # We run this because the DB might not be available for a while due to a race condition. - run: dockerize -wait tcp://localhost:5432 -timeout 1m -jobs: - 'Local Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - # Install dependencies - - run: "bundle install" - - run: "bundle clean --force" - - run: "yarn install" - - *wait_for_docker - - run: - name: Run unit tests - command: bundle exec rails test - - 'Local Standard Ruby': - docker: - - <<: *ruby_node_browsers_docker_image - steps: - - checkout - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - ruby/bundle-install - - run: bundle clean --force - - run: yarn install - - # # Save dependency caches - # # We only do this as part of this job, because it's time consuming and we don't want it to slow down test runners. - # - save_cache: *save_bundle_cache - # - save_cache: *save_yarn_cache - - - run: - name: Check Standard Ruby - command: bundle exec standardrb - - 'Starter Repo Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - parallelism: 16 - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-sortable\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-sortable\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: | - cd tmp/starter - export RAILS_ENV=test - SKIP_RESOLVE_TEST=1 bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - KNAPSACK_PRO_CI_NODE_TOTAL: 16 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - - 'Starter Repo Minitest for Super Scaffolding': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-sortable\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-sortable\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: "cd tmp/starter && bundle add spring" - - run: - name: 'Setup Super Scaffolding System Test' - command: "cd tmp/starter && bundle exec test/bin/setup-super-scaffolding-system-test" - - run: - name: 'Run Super Scaffolding Test' - command: "cd tmp/starter && bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb" - -workflows: - version: 2 - build: - jobs: - # TODO Figure out why this isn't passing. - # - 'Local Minitest' - - 'Local Standard Ruby' - - 'Starter Repo Minitest' - - 'Starter Repo Minitest for Super Scaffolding' diff --git a/bullet_train-super_scaffolding/.circleci/config.yml b/bullet_train-super_scaffolding/.circleci/config.yml deleted file mode 100644 index 1de00488a..000000000 --- a/bullet_train-super_scaffolding/.circleci/config.yml +++ /dev/null @@ -1,188 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@2.0.0 - browser-tools: circleci/browser-tools@1.4.1 -aliases: - - &restore_bundler_cache - name: Restore Bundler cache - keys: - - gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-cache-v1-{{ .Branch }}- - - gem-cache-v1- - - &restore_yarn_cache - name: Restore Yarn cache - keys: - - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v1-{{ .Branch }}- - - yarn-packages- - - &save_bundle_cache - name: Save Bundle cache - key: gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - &save_yarn_cache - name: Save Yarn cache - key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules - - &ruby_node_browsers_docker_image - - image: cimg/ruby:3.2.2-browsers - environment: - PGHOST: localhost - PGUSER: untitled_application - RAILS_ENV: test - - &postgres_docker_image - - image: circleci/postgres - environment: - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_DB: untitled_application_test - POSTGRES_USER: untitled_application - - &wait_for_docker - # We run this because the DB might not be available for a while due to a race condition. - run: dockerize -wait tcp://localhost:5432 -timeout 1m -jobs: - 'Local Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - # Install dependencies - - run: "bundle install" - - run: "bundle clean --force" - - run: "yarn install" - - *wait_for_docker - - run: - name: Run unit tests - command: bundle exec rails test - - 'Local Standard Ruby': - docker: - - <<: *ruby_node_browsers_docker_image - steps: - - checkout - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - ruby/bundle-install - - run: bundle clean --force - - run: yarn install - - # # Save dependency caches - # # We only do this as part of this job, because it's time consuming and we don't want it to slow down test runners. - # - save_cache: *save_bundle_cache - # - save_cache: *save_yarn_cache - - - run: - name: Check Standard Ruby - command: bundle exec standardrb - - 'Starter Repo Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - parallelism: 16 - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-super_scaffolding\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-super_scaffolding\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: | - cd tmp/starter - export RAILS_ENV=test - bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - KNAPSACK_PRO_CI_NODE_TOTAL: 16 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - - 'Starter Repo Minitest for Super Scaffolding': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-super_scaffolding\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-super_scaffolding\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: "cd tmp/starter && bundle add spring" - - run: - name: 'Setup Super Scaffolding System Test' - command: "cd tmp/starter && bundle exec test/bin/setup-super-scaffolding-system-test" - - run: - name: 'Run Super Scaffolding Test' - command: "cd tmp/starter && bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb" - -workflows: - version: 2 - build: - jobs: - # - 'Local Minitest' - - 'Local Standard Ruby' - - 'Starter Repo Minitest' - - 'Starter Repo Minitest for Super Scaffolding' diff --git a/bullet_train-themes-light/.circleci/config.yml b/bullet_train-themes-light/.circleci/config.yml deleted file mode 100644 index e39dd20d1..000000000 --- a/bullet_train-themes-light/.circleci/config.yml +++ /dev/null @@ -1,249 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@0.1.2 - browser-tools: circleci/browser-tools@1.1 -aliases: - - &restore_bundler_cache - name: Restore Bundler cache - keys: - - gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-cache-v1-{{ .Branch }}- - - gem-cache-v1- - - &restore_yarn_cache - name: Restore Yarn cache - keys: - - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v1-{{ .Branch }}- - - yarn-packages- - - &save_bundle_cache - name: Save Bundle cache - key: gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - &save_yarn_cache - name: Save Yarn cache - key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules - - &ruby_node_browsers_docker_image - - image: cimg/ruby:3.2.2-browsers - environment: - PGHOST: localhost - PGUSER: untitled_application - RAILS_ENV: test - - &postgres_docker_image - - image: circleci/postgres - environment: - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_DB: untitled_application_test - POSTGRES_USER: untitled_application - - &wait_for_docker - # We run this because the DB might not be available for a while due to a race condition. - run: dockerize -wait tcp://localhost:5432 -timeout 1m -jobs: - 'Local Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - # Install dependencies - - run: "bundle install" - - run: "bundle clean --force" - - run: "yarn install" - - *wait_for_docker - - run: - name: Run unit tests - command: bundle exec rails test - - 'Local Standard Ruby': - docker: - - <<: *ruby_node_browsers_docker_image - steps: - - checkout - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - ruby/bundle-install - - run: bundle clean --force - - run: yarn install - - # # Save dependency caches - # # We only do this as part of this job, because it's time consuming and we don't want it to slow down test runners. - # - save_cache: *save_bundle_cache - # - save_cache: *save_yarn_cache - - - run: - name: Check Standard Ruby - command: bundle exec standardrb - - 'Starter Repo Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - parallelism: 16 - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-themes-light\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-themes-light\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: | - cd tmp/starter - export RAILS_ENV=test - SKIP_RESOLVE_TEST=1 bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - KNAPSACK_PRO_CI_NODE_TOTAL: 16 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - - 'Starter Repo Minitest for Super Scaffolding': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-themes-light\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-themes-light\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: "cd tmp/starter && bundle add spring" - - run: - name: 'Setup Super Scaffolding System Test' - command: "cd tmp/starter && bundle exec test/bin/setup-super-scaffolding-system-test" - - run: - name: 'Run Super Scaffolding Test' - command: "cd tmp/starter && bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb" - - 'Eject Theme Test': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - parallelism: 16 - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-themes-light\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-themes-light\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - # Eject theme to Starter Repo - - run: "cd tmp/starter && rake bullet_train:themes:light:eject[foo]" - - run: "cd tmp/starter && yarn foo:build; yarn foo:build:css; yarn foo:build:mailer:css" - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: | - cd tmp/starter - export RAILS_ENV=test - SKIP_RESOLVE_TEST=1 bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - KNAPSACK_PRO_CI_NODE_TOTAL: 16 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - -workflows: - version: 2 - build: - jobs: - # TODO Figure out why this isn't passing. - # - 'Local Minitest' - - 'Local Standard Ruby' - - 'Starter Repo Minitest' - - 'Starter Repo Minitest for Super Scaffolding' - - 'Eject Theme Test' diff --git a/bullet_train-themes-tailwind_css/.circleci/config.yml b/bullet_train-themes-tailwind_css/.circleci/config.yml deleted file mode 100644 index bee8a7be2..000000000 --- a/bullet_train-themes-tailwind_css/.circleci/config.yml +++ /dev/null @@ -1,189 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@0.1.2 - browser-tools: circleci/browser-tools@1.1 -aliases: - - &restore_bundler_cache - name: Restore Bundler cache - keys: - - gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-cache-v1-{{ .Branch }}- - - gem-cache-v1- - - &restore_yarn_cache - name: Restore Yarn cache - keys: - - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v1-{{ .Branch }}- - - yarn-packages- - - &save_bundle_cache - name: Save Bundle cache - key: gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - &save_yarn_cache - name: Save Yarn cache - key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules - - &ruby_node_browsers_docker_image - - image: cimg/ruby:3.2.2-browsers - environment: - PGHOST: localhost - PGUSER: untitled_application - RAILS_ENV: test - - &postgres_docker_image - - image: circleci/postgres - environment: - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_DB: untitled_application_test - POSTGRES_USER: untitled_application - - &wait_for_docker - # We run this because the DB might not be available for a while due to a race condition. - run: dockerize -wait tcp://localhost:5432 -timeout 1m -jobs: - 'Local Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - # Install dependencies - - run: "bundle install" - - run: "bundle clean --force" - - run: "yarn install" - - *wait_for_docker - - run: - name: Run unit tests - command: bundle exec rails test - - 'Local Standard Ruby': - docker: - - <<: *ruby_node_browsers_docker_image - steps: - - checkout - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - ruby/bundle-install - - run: bundle clean --force - - run: yarn install - - # # Save dependency caches - # # We only do this as part of this job, because it's time consuming and we don't want it to slow down test runners. - # - save_cache: *save_bundle_cache - # - save_cache: *save_yarn_cache - - - run: - name: Check Standard Ruby - command: bundle exec standardrb - - 'Starter Repo Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - parallelism: 16 - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-themes-tailwind_css\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-themes-tailwind_css\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: | - cd tmp/starter - export RAILS_ENV=test - SKIP_RESOLVE_TEST=1 bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - KNAPSACK_PRO_CI_NODE_TOTAL: 16 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - - 'Starter Repo Minitest for Super Scaffolding': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-themes-tailwind_css\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-themes-tailwind_css\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: "cd tmp/starter && bundle add spring" - - run: - name: 'Setup Super Scaffolding System Test' - command: "cd tmp/starter && bundle exec test/bin/setup-super-scaffolding-system-test" - - run: - name: 'Run Super Scaffolding Test' - command: "cd tmp/starter && bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb" - -workflows: - version: 2 - build: - jobs: - # TODO Figure out why this isn't passing. - # - 'Local Minitest' - - 'Local Standard Ruby' - - 'Starter Repo Minitest' - - 'Starter Repo Minitest for Super Scaffolding' diff --git a/bullet_train-themes/.circleci/config.yml b/bullet_train-themes/.circleci/config.yml deleted file mode 100644 index 908c32472..000000000 --- a/bullet_train-themes/.circleci/config.yml +++ /dev/null @@ -1,188 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@0.1.2 - browser-tools: circleci/browser-tools@1.1 -aliases: - - &restore_bundler_cache - name: Restore Bundler cache - keys: - - gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-cache-v1-{{ .Branch }}- - - gem-cache-v1- - - &restore_yarn_cache - name: Restore Yarn cache - keys: - - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v1-{{ .Branch }}- - - yarn-packages- - - &save_bundle_cache - name: Save Bundle cache - key: gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - &save_yarn_cache - name: Save Yarn cache - key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules - - &ruby_node_browsers_docker_image - - image: cimg/ruby:3.2.2-browsers - environment: - PGHOST: localhost - PGUSER: untitled_application - RAILS_ENV: test - - &postgres_docker_image - - image: circleci/postgres - environment: - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_DB: untitled_application_test - POSTGRES_USER: untitled_application - - &wait_for_docker - # We run this because the DB might not be available for a while due to a race condition. - run: dockerize -wait tcp://localhost:5432 -timeout 1m -jobs: - 'Local Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - # Install dependencies - - run: "bundle install" - - run: "bundle clean --force" - - run: "yarn install" - - *wait_for_docker - - run: - name: Run unit tests - command: bundle exec rails test - - 'Local Standard Ruby': - docker: - - <<: *ruby_node_browsers_docker_image - steps: - - checkout - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - ruby/bundle-install - - run: bundle clean --force - - run: yarn install - - # # Save dependency caches - # # We only do this as part of this job, because it's time consuming and we don't want it to slow down test runners. - # - save_cache: *save_bundle_cache - # - save_cache: *save_yarn_cache - - - run: - name: Check Standard Ruby - command: bundle exec standardrb - - 'Starter Repo Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - parallelism: 16 - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-themes\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-themes\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: | - cd tmp/starter - export RAILS_ENV=test - bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - KNAPSACK_PRO_CI_NODE_TOTAL: 16 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - - 'Starter Repo Minitest for Super Scaffolding': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - run: "git clone https://github.com/bullet-train-co/bullet_train.git tmp/starter" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train-themes\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train-themes\", path: \"../..\"' >> tmp/starter/Gemfile" - - # TODO Figure out how to make these work for `tmp/starter` - # # Restore dependency caches - # - restore_cache: *restore_bundler_cache - # - restore_cache: *restore_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle clean --force" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - *wait_for_docker - - - run: "cd tmp/starter && bundle add spring" - - run: - name: 'Setup Super Scaffolding System Test' - command: "cd tmp/starter && bundle exec test/bin/setup-super-scaffolding-system-test" - - run: - name: 'Run Super Scaffolding Test' - command: "cd tmp/starter && bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb" - -workflows: - version: 2 - build: - jobs: - - 'Local Minitest' - - 'Local Standard Ruby' - - 'Starter Repo Minitest' - - 'Starter Repo Minitest for Super Scaffolding' diff --git a/bullet_train/.circleci/config.yml b/bullet_train/.circleci/config.yml deleted file mode 100644 index 85f5813ae..000000000 --- a/bullet_train/.circleci/config.yml +++ /dev/null @@ -1,220 +0,0 @@ -version: 2.1 -orbs: - ruby: circleci/ruby@0.1.2 - browser-tools: circleci/browser-tools@1.1 - jq: circleci/jq@2.2.0 -aliases: - - &restore_bundler_cache - name: Restore Bundler cache - keys: - - gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - gem-cache-v1-{{ .Branch }}- - - gem-cache-v1- - - &restore_yarn_cache - name: Restore Yarn cache - keys: - - yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-v1-{{ .Branch }}- - - yarn-packages- - - &save_bundle_cache - name: Save Bundle cache - key: gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - &save_yarn_cache - name: Save Yarn cache - key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules - - &restore_tmp_bundler_cache - name: Restore Bundler cache - keys: - - tmp-starter-gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - - tmp-starter-gem-cache-v1-{{ .Branch }}- - - tmp-starter-gem-cache-v1- - - &restore_tmp_yarn_cache - name: Restore Yarn cache - keys: - - tmp-starter-yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - - tmp-starter-yarn-packages-v1-{{ .Branch }}- - - tmp-starter-yarn-packages- - - &save_tmp_bundle_cache - name: Save Bundle cache - key: tmp-starter-gem-cache-v1-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - paths: - - tmp/starter/vendor/bundle - - &save_tmp_yarn_cache - name: Save Yarn cache - key: tmp-starter-yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - tmp/starter/node_modules - - &ruby_node_browsers_docker_image - - image: cimg/ruby:3.2.2-browsers - environment: - PGHOST: localhost - PGUSER: untitled_application - RAILS_ENV: test - - &postgres_docker_image - - image: circleci/postgres - environment: - POSTGRES_HOST_AUTH_METHOD: trust - POSTGRES_DB: untitled_application_test - POSTGRES_USER: untitled_application - - &wait_for_docker - # We run this because the DB might not be available for a while due to a race condition. - run: dockerize -wait tcp://localhost:5432 -timeout 1m -jobs: - 'Local Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - # Install dependencies - - run: "bundle install" - - run: "bundle clean --force" - - run: "yarn install" - - *wait_for_docker - - run: - name: Run unit tests - command: bundle exec rails test - - 'Local Standard Ruby': - docker: - - <<: *ruby_node_browsers_docker_image - steps: - - checkout - - # # Restore dependency caches - - restore_cache: *restore_bundler_cache - - restore_cache: *restore_yarn_cache - - # Install dependencies - - ruby/bundle-install - - run: bundle clean --force - - run: yarn install - - # # Save dependency caches - # # We only do this as part of this job, because it's time consuming and we don't want it to slow down test runners. - - save_cache: *save_bundle_cache - - save_cache: *save_yarn_cache - - - run: - name: Check Standard Ruby - command: bundle exec standardrb - - 'Starter Repo Minitest': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - parallelism: 16 - steps: - - browser-tools/install-browser-tools - - checkout - - run: - name: Clone Starter Repository for testing - command: bash ./.circleci/matching_branch_check - - - run: - name: Rename the directory of the Ruby gem being tested for the partial resolver test. - command: "mv /home/circleci/project /home/circleci/bullet_train-base && ln -s /home/circleci/bullet_train-base /home/circleci/project" - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train\", path: \"../..\"' >> tmp/starter/Gemfile" - - - restore_cache: *restore_tmp_bundler_cache - - restore_cache: *restore_tmp_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install --path=vendor/bundle" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - save_cache: *save_tmp_bundle_cache - - save_cache: *save_tmp_yarn_cache - - - *wait_for_docker - - - run: - name: Run tests with Knapsack Pro - command: | - cd tmp/starter - export RAILS_ENV=test - bundle exec rails "knapsack_pro:queue:minitest[--verbose]" - environment: - KNAPSACK_PRO_CI_NODE_TOTAL: 16 - - # If you don't want to use Knapsack Pro, then use this configuration: - # - # - run: - # name: Run unit tests - # command: bundle exec rails test - # - run: - # name: Run system tests - # command: bundle exec rails test:system - # - # If you want to gather test results in CircleCI when not running tests in parallel, - # include `minitest-ci` in your Gemfile and uncomment the following step. - # You can access the test results via the "Tests" tab within each build in CircleCI. - # - # - store_test_results: - # path: test/reports - - 'Starter Repo Minitest for Super Scaffolding': - docker: - - <<: *ruby_node_browsers_docker_image - - <<: *postgres_docker_image - - image: circleci/redis - executor: ruby/default - steps: - - browser-tools/install-browser-tools - - checkout - - run: - name: Clone Starter Repository for testing - command: bash ./.circleci/matching_branch_check - - - run: - name: Link starter repository to the Ruby gem being tested. - command: "grep -v 'gem \"bullet_train\"' tmp/starter/Gemfile > tmp/starter/Gemfile.tmp && mv tmp/starter/Gemfile.tmp tmp/starter/Gemfile && echo 'gem \"bullet_train\", path: \"../..\"' >> tmp/starter/Gemfile" - - # # Restore dependency caches - - restore_cache: *restore_tmp_bundler_cache - - restore_cache: *restore_tmp_yarn_cache - - # Install dependencies - - run: "cd tmp/starter && bundle install" - - run: "cd tmp/starter && bundle exec rake bt:link" - - run: "cd tmp/starter && yarn install" - - run: "cd tmp/starter && yarn build" - - run: "cd tmp/starter && yarn build:css" - - - save_cache: *save_tmp_bundle_cache - - save_cache: *save_tmp_yarn_cache - - - *wait_for_docker - - - run: "cd tmp/starter && bundle add spring" - - run: - name: 'Setup Super Scaffolding System Test' - command: "cd tmp/starter && bundle exec test/bin/setup-super-scaffolding-system-test" - - run: - name: 'Run Super Scaffolding Test' - command: "cd tmp/starter && bundle exec rails test test/system/super_scaffolding/super_scaffolding_test.rb" - -workflows: - version: 2 - build: - jobs: - - 'Local Minitest' - - 'Local Standard Ruby' - - 'Starter Repo Minitest' - - 'Starter Repo Minitest for Super Scaffolding'