From 2d293aae6ed146ae95c19cc59923e5e40b620383 Mon Sep 17 00:00:00 2001 From: 010ByteNinja Date: Tue, 10 Feb 2026 07:02:12 +0300 Subject: [PATCH 1/2] Add .circleci/config.yml --- .circleci/config.yml | 56 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..af08b04 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,56 @@ +version: 2.1 +orbs: + # To install the required node version + node: circleci/node@5.0.3 +jobs: + build: + # No. of servers/machines + parallelism: 1 + docker: + - image: cimg/ruby:3.3.5 + - image: cimg/redis:5.0.14 + - image: cimg/postgres:9.6 + environment: + POSTGRES_HOST_AUTH_METHOD: trust + + #application directory change it with your application directory name + working_directory: ~/granite + environment: + TZ: "/usr/share/zoneinfo/America/New_York" + RAILS_ENV: "test" + RACK_ENV: "test" + + steps: + - checkout + - node/install: + install-yarn: true + node-version: "22.13" + - run: node --version + - run: gem install bundler:2.2.20 + #install sqlite dependency + - run: sudo apt update && sudo apt install zlib1g-dev libsqlite3-dev + # Bundle install + - run: bundle check --path=vendor/bundle || bundle install + --path=vendor/bundle --jobs=4 --retry=3 + # Yarn install + - run: yarn install --cache-folder vendor/node_modules + # Ensure Rubocop has linted all Ruby files + - run: bundle exec rubocop + # Ensure Prettier+ESLint has been run on all JS files + - run: + npx prettier "./app/javascript/src/**/*.{js,jsx,json}" && npx eslint + "./app/javascript/src/**/*.{js,jsx,json}" + # Setup database + - run: cp config/database.yml.ci config/database.yml + - run: bundle exec rails db:create db:schema:load --trace + # Generate assets + - run: yarn build + # Unit tests + - run: + shell: /bin/bash + command: bundle exec rake db:test:prepare && bundle exec rails t -v +workflows: + version: 2 + commit: + jobs: + - build \ No newline at end of file From bcf70165e9fe7ab7c892eecb6030fd4bc163518f Mon Sep 17 00:00:00 2001 From: 010ByteNinja Date: Tue, 10 Feb 2026 07:06:09 +0300 Subject: [PATCH 2/2] Updated config.yml --- .circleci/config.yml | 110 +++++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index af08b04..0c5574c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,56 +1,56 @@ -version: 2.1 -orbs: - # To install the required node version - node: circleci/node@5.0.3 -jobs: - build: - # No. of servers/machines - parallelism: 1 - docker: - - image: cimg/ruby:3.3.5 - - image: cimg/redis:5.0.14 - - image: cimg/postgres:9.6 - environment: - POSTGRES_HOST_AUTH_METHOD: trust - - #application directory change it with your application directory name - working_directory: ~/granite - environment: - TZ: "/usr/share/zoneinfo/America/New_York" - RAILS_ENV: "test" - RACK_ENV: "test" - - steps: - - checkout - - node/install: - install-yarn: true - node-version: "22.13" - - run: node --version - - run: gem install bundler:2.2.20 - #install sqlite dependency - - run: sudo apt update && sudo apt install zlib1g-dev libsqlite3-dev - # Bundle install - - run: bundle check --path=vendor/bundle || bundle install - --path=vendor/bundle --jobs=4 --retry=3 - # Yarn install - - run: yarn install --cache-folder vendor/node_modules - # Ensure Rubocop has linted all Ruby files - - run: bundle exec rubocop - # Ensure Prettier+ESLint has been run on all JS files - - run: - npx prettier "./app/javascript/src/**/*.{js,jsx,json}" && npx eslint - "./app/javascript/src/**/*.{js,jsx,json}" - # Setup database - - run: cp config/database.yml.ci config/database.yml - - run: bundle exec rails db:create db:schema:load --trace - # Generate assets - - run: yarn build - # Unit tests - - run: - shell: /bin/bash - command: bundle exec rake db:test:prepare && bundle exec rails t -v -workflows: - version: 2 - commit: - jobs: +version: 2.1 +orbs: + # To install the required node version + node: circleci/node@5.0.3 +jobs: + build: + # No. of servers/machines + parallelism: 1 + docker: + - image: cimg/ruby:3.3.5 + - image: cimg/redis:5.0.14 + - image: cimg/postgres:9.6 + environment: + POSTGRES_HOST_AUTH_METHOD: trust + + #application directory change it with your application directory name + working_directory: ~/granite + environment: + TZ: "/usr/share/zoneinfo/America/New_York" + RAILS_ENV: "test" + RACK_ENV: "test" + + steps: + - checkout + - node/install: + install-yarn: true + node-version: "22.13" + - run: node --version + - run: gem install bundler:2.2.20 + #install sqlite dependency + - run: sudo apt update && sudo apt install zlib1g-dev libsqlite3-dev + # Bundle install + - run: bundle check --path=vendor/bundle || bundle install + --path=vendor/bundle --jobs=4 --retry=3 + # Yarn install + - run: yarn install --cache-folder vendor/node_modules + # Ensure Rubocop has linted all Ruby files + - run: bundle exec rubocop + # Ensure Prettier+ESLint has been run on all JS files + - run: + npx prettier "./app/javascript/src/**/*.{js,jsx,json}" && npx eslint + "./app/javascript/src/**/*.{js,jsx,json}" + # Setup database + - run: cp config/database.yml.ci config/database.yml + - run: bundle exec rails db:create db:schema:load --trace + # Generate assets + - run: yarn build + # Unit tests + - run: + shell: /bin/bash + command: bundle exec rake db:test:prepare && bundle exec rails t -v +workflows: + version: 2 + commit: + jobs: - build \ No newline at end of file