Skip to content

Commit

Permalink
Merge branch 'main' into features/custom-date-formats
Browse files Browse the repository at this point in the history
  • Loading branch information
gazayas committed Aug 3, 2023
2 parents 6a6df6e + d27d3de commit 6ae9507
Show file tree
Hide file tree
Showing 165 changed files with 6,112 additions and 2,210 deletions.
156 changes: 144 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1
orbs:
ruby: circleci/[email protected]
browser-tools: circleci/[email protected]
browser-tools: circleci/browser-tools@1.4.1
aliases:
- &restore_bundler_cache
name: Restore Bundler cache
Expand All @@ -26,13 +26,13 @@ aliases:
paths:
- node_modules
- &ruby_node_browsers_docker_image
- image: cimg/ruby:3.1.2-browsers
- image: cimg/ruby:3.2.2-browsers
environment:
PGHOST: localhost
PGUSER: untitled_application
RAILS_ENV: test
- &postgres_docker_image
- image: circleci/postgres
- image: cimg/postgres:14.2
environment:
POSTGRES_HOST_AUTH_METHOD: trust
POSTGRES_DB: untitled_application_test
Expand Down Expand Up @@ -70,15 +70,15 @@ jobs:
docker:
- <<: *ruby_node_browsers_docker_image
- <<: *postgres_docker_image
- image: circleci/redis
- image: cimg/redis:6.2.6
executor: ruby/default
parallelism: 1
steps:
- checkout
- restore_cache: *restore_bundler_cache

# Install dependencies
- ruby/bundle-install
- run: bundle clean --force

- run:
name: Running rails db:migrate shouldn't cause changes
Expand All @@ -88,19 +88,19 @@ jobs:
docker:
- <<: *ruby_node_browsers_docker_image
- <<: *postgres_docker_image
- image: circleci/redis
- image: cimg/redis:6.2.6
executor: ruby/default
parallelism: 16
steps:
- browser-tools/install-browser-tools
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- checkout
- restore_cache: *restore_bundler_cache
- restore_cache: *restore_yarn_cache

# Install dependencies
- ruby/bundle-install
- run: bundle clean --force
- run: bundle exec rake bt:link
- run: bin/link
- run: yarn install
- run: yarn build
- run: yarn build:css
Expand Down Expand Up @@ -131,17 +131,16 @@ jobs:
# - store_test_results:
# path: test/reports

'Minitest for Super Scaffolding':
'Minitest with HIDE_THINGS':
docker:
- <<: *ruby_node_browsers_docker_image
- <<: *postgres_docker_image
- image: circleci/redis
executor: ruby/default
parallelism: 16
steps:
- browser-tools/install-browser-tools
- checkout

# Restore dependency caches
- restore_cache: *restore_bundler_cache
- restore_cache: *restore_yarn_cache

Expand All @@ -155,12 +154,142 @@ jobs:

- *wait_for_docker

- run:
name: Run tests with Knapsack Pro
command: |
export RAILS_ENV=test
bundle exec rails "knapsack_pro:queue:minitest[--verbose]"
environment:
KNAPSACK_PRO_CI_NODE_TOTAL: 16
HIDE_THINGS: true

# If you don't want to use Knapsack Pro, then use this configuration:
#
# - run:
# name: Run unit tests with HIDE_THINGS
# command: HIDE_THINGS=true bundle exec rails test
# - run:
# name: Run system tests with HIDE_THINGS
# command: HIDE_THINGS=true 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

'Minitest for Super Scaffolding':
docker:
- <<: *ruby_node_browsers_docker_image
- <<: *postgres_docker_image
- image: cimg/redis:6.2.6
executor: ruby/default
parallelism: 7
steps:
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- checkout

# Restore dependency caches
- restore_cache: *restore_bundler_cache
- restore_cache: *restore_yarn_cache

# Install dependencies
- ruby/bundle-install
- run: bin/link
- run: yarn install
- run: yarn build
- run: yarn build:css

- *wait_for_docker

- 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_test.rb
- run:
name: 'Run Super Scaffolding Partial Test'
command: bundle exec rails test test/system/super_scaffolding_partial_test.rb

'System Tests with Cuprite':
docker:
- <<: *ruby_node_browsers_docker_image
- <<: *postgres_docker_image
- image: cimg/redis:6.2.6
executor: ruby/default
parallelism: 16
steps:
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- checkout
- restore_cache: *restore_bundler_cache
- restore_cache: *restore_yarn_cache

# Install dependencies
- ruby/bundle-install
- run: bin/link
- run: yarn install
- run: yarn build
- run: yarn build:css

- *wait_for_docker

- run:
name: Run system tests with cuprite as system test driver
command: |
if test $BT_CORE_CI
then
echo "Running system tests with Cuprite"
sed -i'.orig' 's/# gem "cuprite"/gem "cuprite"/' Gemfile
sed -i'.orig' 's/gem "selenium-webdriver"/# gem "selenium-webdriver"/' Gemfile
sed -i'.orig' 's/gem "webdrivers"/# gem "webdrivers"/' Gemfile
bundle install
bundle exec rails "knapsack_pro:queue:minitest[--verbose]"
else
echo "Skipping system tests with Cuprite"
exit 0
fi
environment:
RAILS_ENV: test
KNAPSACK_PRO_CI_NODE_TOTAL: 16
KNAPSACK_PRO_TEST_FILE_PATTERN: "test/system/**{,/*/**}/*_test.rb"

# Uncomment the job at the bottom of this file to run these system tests.
'System Tests for Action Models':
docker:
- <<: *ruby_node_browsers_docker_image
- <<: *postgres_docker_image
- image: cimg/redis:6.2.6
executor: ruby/default
parallelism: 4

steps:
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- checkout
- restore_cache: *restore_bundler_cache
- restore_cache: *restore_yarn_cache

# Install dependencies
- ruby/bundle-install
- run: bin/link
- run: yarn install
- run: yarn build
- run: yarn build:css

- *wait_for_docker

- run: bundle add spring
- run:
name: 'Setup Action Models System Test'
command: bundle exec test/bin/setup-action-models-system-test
- run:
name: 'Run Action Models Test'
command: bundle exec rails test test/system/action_models_test.rb

workflows:
version: 2
Expand All @@ -169,4 +298,7 @@ workflows:
- 'Standard Ruby'
- 'Database Schema Check'
- 'Minitest'
- 'Minitest with HIDE_THINGS'
- 'Minitest for Super Scaffolding'
# - 'System Tests with Cuprite'
# - 'System Tests for Action Models'
26 changes: 26 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Auto Merge main

# on:
# push:
# branches:
# - main

jobs:
merge_main:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Git
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "[email protected]"
- name: Merge main into edge
run: |
git checkout edge
git merge main --no-edit
git push origin edge
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@

# Ignore master key for decrypting credentials and more.
/config/master.key
/config/credentials/development.key
/config/credentials/test.key
/config/credentials/production.key

/app/assets/builds/*
!/app/assets/builds/.keep
Expand Down Expand Up @@ -56,10 +59,13 @@ Untitled
.idea/

# Ignore development tools files
.tool-versions
.byebug_history
dump.rdb

# Ignore locally cloned framework packages.
/local

# Ignore test coverage results generated by simplecov.
/coverage

# 🚅 add your files to ignore here.
42 changes: 42 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file)
# and commit this file to your remote git repository to share the goodness with others.
image:
file: gitpod.Dockerfile
tasks:
- name: Redis
init: gp sync-done redis-started
command: redis-server

- name: Rails
init: |
gp sync-await redis-started
bundle install &&
bin/setup &&
rails db:setup &&
gp sync-done bundle # 'bundle' is an arbitrary name
command: bin/dev

ports:
# Rails server
- port: 3000
onOpen: open-preview
# PostgreSQL server
- port: 5432
onOpen: ignore
github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to true)
addComment: true
# add a "Review in Gitpod" button to pull requests (defaults to false)
addBadge: false
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: prebuilt-in-gitpod
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.1.0
19.3.0
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.2
3.2.2
3 changes: 1 addition & 2 deletions .standard.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
ignore:
- 'local/**/*'
- '**/*':
- Style/TrailingCommaInArguments
- Style/TrailingCommaInArrayLiteral
- Style/TrailingCommaInHashLiteral
- Style/CommentedKeyword
- 'app/controllers/**/*':
- Style/RedundantAssignment
- 'config/routes.rb':
- Lint/UselessAssignment
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Bullet Train Starter Repository Changelog
This file is limited to breaking or potentially breaking changes. Please review any new items carefully when upgrading your application.

## March 7, 2023
- `rails db:migrate` and `rails db:seed` will now automatically be run on deploy to Heroku or Render. For more information about why we want seeds run on every deploy, see [Database Seeds](http://bullettrain.co/docs/seeds) in our documentation.
Loading

0 comments on commit 6ae9507

Please sign in to comment.