From ba60ff57676c9edda90ca956400e75ae69ee9dfb Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 16:45:10 +0100 Subject: [PATCH 01/21] Add CI --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..d1962351aa --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: Suite Tests + +on: + pull_request: + +jobs: + linting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - run: bundle exec standardrb + + suite-tests: + needs: + - linting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - run: bundle exec rspec From c6091821a05c7cc2a5c45255d65a9e1b3d29fd3d Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 16:55:47 +0100 Subject: [PATCH 02/21] set RAILS_ENV to prod --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1962351aa..aa8fb7c683 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,9 @@ name: Suite Tests on: pull_request: +env: + RAILS_ENV: production + jobs: linting: runs-on: ubuntu-latest From 09d472ad89680391d6611bd4bc1908a9d3ba0281 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 17:01:54 +0100 Subject: [PATCH 03/21] remove pg_query; we have "explain analyze" --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index bcb0663688..90bb93c5f2 100755 --- a/Gemfile +++ b/Gemfile @@ -126,7 +126,6 @@ group :development, :test, :profiling do gem "derailed_benchmarks" gem "memory_profiler", require: false gem "prosopite" - gem "pg_query" end group :development do From 8e2ef737197d0e43385b0d08f3a3fe4fc1cca932 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 17:03:28 +0100 Subject: [PATCH 04/21] bundle install --- Gemfile.lock | 3 --- 1 file changed, 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3e442f22b3..866c946ca6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -415,8 +415,6 @@ GEM pg_ltree (1.1.8) activerecord (>= 4.0.0, <= 7.0.0.rc1) pg (>= 0.17.0, < 2) - pg_query (2.1.4) - google-protobuf (>= 3.19.2) pg_search (2.3.6) activerecord (>= 5.2) activesupport (>= 5.2) @@ -782,7 +780,6 @@ DEPENDENCIES passenger pg (>= 0.18, < 2.0) pg_ltree (= 1.1.8) - pg_query pg_search phonelib prometheus_exporter From b949d24415ceca155727e96221fb5b33ecb0ac98 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 17:13:35 +0100 Subject: [PATCH 05/21] set RAILS_ENV = test --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa8fb7c683..18fe158238 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,3 +26,5 @@ jobs: with: bundler-cache: true - run: bundle exec rspec + env: + RAILS_ENV: test From 7a3112493f0be5c9c37af93f9ce4683ea0412544 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 17:27:35 +0100 Subject: [PATCH 06/21] prepare db --- .github/workflows/ci.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 18fe158238..fd2629a990 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,14 +17,31 @@ jobs: - run: bundle exec standardrb suite-tests: + services: + postgres: + image: postgres + env: + POSTGRES_PASSWORD: postgres + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 needs: - linting runs-on: ubuntu-latest + env: + RAILS_ENV: test + DISABLE_SPRING: 1 + SIMPLE_SERVER_DATABASE_HOST: postgres + SIMPLE_SERVER_DATABASE_USERNAME: postgres + SIMPLE_SERVER_DATABASE_PASSWORD: postgres + TEST_ENV_NUMBER: 1 steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: bundler-cache: true + - name: Setup DB + run: bundle exec rake db:prepare - run: bundle exec rspec - env: - RAILS_ENV: test From c443456f2c3f3806bf4576a4a9ef94eca6307875 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 19:44:50 +0100 Subject: [PATCH 07/21] forward the postgres port to localhost --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd2629a990..c748c25812 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: image: postgres env: POSTGRES_PASSWORD: postgres + port: "5432:5432" options: >- --health-cmd pg_isready --health-interval 10s @@ -33,7 +34,7 @@ jobs: env: RAILS_ENV: test DISABLE_SPRING: 1 - SIMPLE_SERVER_DATABASE_HOST: postgres + SIMPLE_SERVER_DATABASE_HOST: localhost SIMPLE_SERVER_DATABASE_USERNAME: postgres SIMPLE_SERVER_DATABASE_PASSWORD: postgres TEST_ENV_NUMBER: 1 From f6b1e0b2c6bf6d9f0afb124eb9c716567ee726e4 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 20:30:59 +0100 Subject: [PATCH 08/21] use box-local PG --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c748c25812..c8f8e251d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,17 +17,17 @@ jobs: - run: bundle exec standardrb suite-tests: - services: - postgres: - image: postgres - env: - POSTGRES_PASSWORD: postgres - port: "5432:5432" - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 + # services: + # postgres: + # image: postgres + # env: + # POSTGRES_PASSWORD: postgres + # port: "5432:5432" + # options: >- + # --health-cmd pg_isready + # --health-interval 10s + # --health-timeout 5s + # --health-retries 5 needs: - linting runs-on: ubuntu-latest @@ -35,7 +35,7 @@ jobs: RAILS_ENV: test DISABLE_SPRING: 1 SIMPLE_SERVER_DATABASE_HOST: localhost - SIMPLE_SERVER_DATABASE_USERNAME: postgres + SIMPLE_SERVER_DATABASE_USERNAME: simple_testuser SIMPLE_SERVER_DATABASE_PASSWORD: postgres TEST_ENV_NUMBER: 1 steps: @@ -43,6 +43,30 @@ jobs: - uses: ruby/setup-ruby@v1 with: bundler-cache: true + - name: Turn on local Postgres + run: | + echo "$(pg_config --bindir)" >> $GITHUB_PATH + + echo "Initializing database cluster..." + export PGHOST="${RUNNER_TEMP//\\//}/postgres + export PGDATA="$PGHOST/pgdata" + mkdir -p "$PGDATA" + + echo "Creating default headless passsword..." + export PWFILE="$RUNNER_TEMP/pwfile" + echo "postgres" > "$PWFILE" + initdb --pgdata="$PGDATA" --username="postgres" --pwfile="$PWFILE" + + echo "Starting Postgresql..." + echo "unix_socket_directories = '$PGHOST'" >> "$PGDATA/postgresql.conf" + pg_ctl start + + echo "Creating user..." + psql --host "$PGHOST" --username="postgres" --dbname="postgres" --command="CREATE USER $SIMPLE_SERVER_DATABASE_USERNAME PASSWORD '$SIMPLE_SERVER_DATABASE_PASSWORD'" --command="\du" + + # (optional; because it would be created by Rails) + # echo "Creating database..." + # createdb --owner="$SIMPLE_SERVER_DATABASE_USERNAME" --username="postgres" "$PGDATABASE" - name: Setup DB run: bundle exec rake db:prepare - run: bundle exec rspec From ac6e0b50fdf91ecaa370b094ea9ae86d69f834a8 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 20:38:52 +0100 Subject: [PATCH 09/21] fix sh syntax error --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8f8e251d2..d5bbfca85e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: echo "$(pg_config --bindir)" >> $GITHUB_PATH echo "Initializing database cluster..." - export PGHOST="${RUNNER_TEMP//\\//}/postgres + export PGHOST="${RUNNER_TEMP//\\//}/postgres" export PGDATA="$PGHOST/pgdata" mkdir -p "$PGDATA" From 779ebeb2dd6f960eaf5eea09bb6cba41d730bb79 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 20:53:23 +0100 Subject: [PATCH 10/21] promote local postgres in separate prior step --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5bbfca85e..32dd7c8def 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,10 +43,10 @@ jobs: - uses: ruby/setup-ruby@v1 with: bundler-cache: true - - name: Turn on local Postgres + - name: Promote local Postgresql + run: echo "$(pg_config --bindir)" >> $GITHUB_PATH + - name: Turn on local Postgresql run: | - echo "$(pg_config --bindir)" >> $GITHUB_PATH - echo "Initializing database cluster..." export PGHOST="${RUNNER_TEMP//\\//}/postgres" export PGDATA="$PGHOST/pgdata" From f26bccabf9ef2da9b86d0d9a9a9b3054b9f51750 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 21:03:59 +0100 Subject: [PATCH 11/21] let's see the bash errors --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32dd7c8def..a561c1c4c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,6 +47,8 @@ jobs: run: echo "$(pg_config --bindir)" >> $GITHUB_PATH - name: Turn on local Postgresql run: | + set -e + echo "Initializing database cluster..." export PGHOST="${RUNNER_TEMP//\\//}/postgres" export PGDATA="$PGHOST/pgdata" From dc9113412d1ca7039de25138f079f41350de16cd Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 21:08:55 +0100 Subject: [PATCH 12/21] simpler? --- .github/workflows/ci.yml | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a561c1c4c5..bd11898e0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,31 +44,33 @@ jobs: with: bundler-cache: true - name: Promote local Postgresql - run: echo "$(pg_config --bindir)" >> $GITHUB_PATH - - name: Turn on local Postgresql run: | - set -e + echo "$(pg_config --bindir)" >> $GITHUB_PATH + sudo systemctl start postgresql.service + # - name: Turn on local Postgresql + # run: | + # set -e - echo "Initializing database cluster..." - export PGHOST="${RUNNER_TEMP//\\//}/postgres" - export PGDATA="$PGHOST/pgdata" - mkdir -p "$PGDATA" + # echo "Initializing database cluster..." + # export PGHOST="${RUNNER_TEMP//\\//}/postgres" + # export PGDATA="$PGHOST/pgdata" + # mkdir -p "$PGDATA" - echo "Creating default headless passsword..." - export PWFILE="$RUNNER_TEMP/pwfile" - echo "postgres" > "$PWFILE" - initdb --pgdata="$PGDATA" --username="postgres" --pwfile="$PWFILE" + # echo "Creating default headless passsword..." + # export PWFILE="$RUNNER_TEMP/pwfile" + # echo "postgres" > "$PWFILE" + # initdb --pgdata="$PGDATA" --username="postgres" --pwfile="$PWFILE" - echo "Starting Postgresql..." - echo "unix_socket_directories = '$PGHOST'" >> "$PGDATA/postgresql.conf" - pg_ctl start + # echo "Starting Postgresql..." + # echo "unix_socket_directories = '$PGHOST'" >> "$PGDATA/postgresql.conf" + # pg_ctl start - echo "Creating user..." - psql --host "$PGHOST" --username="postgres" --dbname="postgres" --command="CREATE USER $SIMPLE_SERVER_DATABASE_USERNAME PASSWORD '$SIMPLE_SERVER_DATABASE_PASSWORD'" --command="\du" + # echo "Creating user..." + # psql --host "$PGHOST" --username="postgres" --dbname="postgres" --command="CREATE USER $SIMPLE_SERVER_DATABASE_USERNAME PASSWORD '$SIMPLE_SERVER_DATABASE_PASSWORD'" --command="\du" - # (optional; because it would be created by Rails) - # echo "Creating database..." - # createdb --owner="$SIMPLE_SERVER_DATABASE_USERNAME" --username="postgres" "$PGDATABASE" + # # (optional; because it would be created by Rails) + # # echo "Creating database..." + # # createdb --owner="$SIMPLE_SERVER_DATABASE_USERNAME" --username="postgres" "$PGDATABASE" - name: Setup DB run: bundle exec rake db:prepare - run: bundle exec rspec From a829381365ec075e5e658b321760fac2234d59f7 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Tue, 20 May 2025 21:20:51 +0100 Subject: [PATCH 13/21] simpler. --- .github/workflows/ci.yml | 61 +++++++++++++--------------------------- 1 file changed, 19 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd11898e0d..13537cc958 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,25 +17,30 @@ jobs: - run: bundle exec standardrb suite-tests: - # services: - # postgres: - # image: postgres - # env: - # POSTGRES_PASSWORD: postgres - # port: "5432:5432" - # options: >- - # --health-cmd pg_isready - # --health-interval 10s - # --health-timeout 5s - # --health-retries 5 + services: + postgres: + image: postgres:14-alpine + env: + POSTGRES_PASSWORD: postgres + port: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + redis: + image: redis + ports: + - 6379:6379 needs: - linting runs-on: ubuntu-latest env: RAILS_ENV: test - DISABLE_SPRING: 1 + NODE_ENV: test SIMPLE_SERVER_DATABASE_HOST: localhost - SIMPLE_SERVER_DATABASE_USERNAME: simple_testuser + SIMPLE_SERVER_DATABASE_USERNAME: postgres SIMPLE_SERVER_DATABASE_PASSWORD: postgres TEST_ENV_NUMBER: 1 steps: @@ -43,34 +48,6 @@ jobs: - uses: ruby/setup-ruby@v1 with: bundler-cache: true - - name: Promote local Postgresql - run: | - echo "$(pg_config --bindir)" >> $GITHUB_PATH - sudo systemctl start postgresql.service - # - name: Turn on local Postgresql - # run: | - # set -e - - # echo "Initializing database cluster..." - # export PGHOST="${RUNNER_TEMP//\\//}/postgres" - # export PGDATA="$PGHOST/pgdata" - # mkdir -p "$PGDATA" - - # echo "Creating default headless passsword..." - # export PWFILE="$RUNNER_TEMP/pwfile" - # echo "postgres" > "$PWFILE" - # initdb --pgdata="$PGDATA" --username="postgres" --pwfile="$PWFILE" - - # echo "Starting Postgresql..." - # echo "unix_socket_directories = '$PGHOST'" >> "$PGDATA/postgresql.conf" - # pg_ctl start - - # echo "Creating user..." - # psql --host "$PGHOST" --username="postgres" --dbname="postgres" --command="CREATE USER $SIMPLE_SERVER_DATABASE_USERNAME PASSWORD '$SIMPLE_SERVER_DATABASE_PASSWORD'" --command="\du" - - # # (optional; because it would be created by Rails) - # # echo "Creating database..." - # # createdb --owner="$SIMPLE_SERVER_DATABASE_USERNAME" --username="postgres" "$PGDATABASE" - name: Setup DB - run: bundle exec rake db:prepare + run: bundle exec rake db:test:prepare - run: bundle exec rspec From 2f5b4cc568602ddc49b881adea269a1673f7cc3d Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Wed, 21 May 2025 16:11:31 +0100 Subject: [PATCH 14/21] fix typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13537cc958..cca5690959 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: image: postgres:14-alpine env: POSTGRES_PASSWORD: postgres - port: + ports: - 5432:5432 options: >- --health-cmd pg_isready From 6e3a052ee5a4e913ca1677c355c43f820b3b610a Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Wed, 21 May 2025 16:14:07 +0100 Subject: [PATCH 15/21] try string specs for ports --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cca5690959..018ba34271 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: env: POSTGRES_PASSWORD: postgres ports: - - 5432:5432 + - "5432:5432" options: >- --health-cmd pg_isready --health-interval 10s @@ -32,7 +32,7 @@ jobs: redis: image: redis ports: - - 6379:6379 + - "6379:6379" needs: - linting runs-on: ubuntu-latest From f873ea9afba5b43f8315f0256958b61dcb6c2d03 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Wed, 21 May 2025 16:15:46 +0100 Subject: [PATCH 16/21] =?UTF-8?q?unindent=20=F0=9F=A4=A6=F0=9F=8F=BD?= =?UTF-8?q?=E2=80=8D=E2=99=82=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 018ba34271..982ba7a688 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,8 @@ jobs: image: postgres:14-alpine env: POSTGRES_PASSWORD: postgres - ports: - - "5432:5432" + ports: + - "5432:5432" options: >- --health-cmd pg_isready --health-interval 10s @@ -32,7 +32,7 @@ jobs: redis: image: redis ports: - - "6379:6379" + - 6379:6379 needs: - linting runs-on: ubuntu-latest From 70046c0d615854c7afe956737fa91ed3655750ae Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Wed, 21 May 2025 16:19:33 +0100 Subject: [PATCH 17/21] concurrency for fast-fails --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 982ba7a688..c409172f76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: env: RAILS_ENV: production +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + jobs: linting: runs-on: ubuntu-latest From 93c1d4cf8a8a1fae9b8b6dd28534af9bc8cc17ad Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Wed, 21 May 2025 16:37:01 +0100 Subject: [PATCH 18/21] precompile assets --- .github/workflows/ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c409172f76..55b4b6eb18 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,7 @@ jobs: env: RAILS_ENV: test NODE_ENV: test + NODE_OPTIONS: --openssl-legacy-provider SIMPLE_SERVER_DATABASE_HOST: localhost SIMPLE_SERVER_DATABASE_USERNAME: postgres SIMPLE_SERVER_DATABASE_PASSWORD: postgres @@ -52,6 +53,17 @@ jobs: - uses: ruby/setup-ruby@v1 with: bundler-cache: true + - uses: actions/setup-node@v4 + with: + node-version: 18.11.0 + cache: 'yarn' + - name: Install Node Packages + run: yarn install --frozen-lockfile - name: Setup DB run: bundle exec rake db:test:prepare - - run: bundle exec rspec + - name: Refresh Materialized Views + run: bundle exec rake db:refresh_matviews + - name: Precompile assets + run: bundle exec rake assets:precompile + - name: Run Tests + run: bundle exec rspec From 6d6e35759d355c8ad81813e7bb3033b66132fc92 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Wed, 21 May 2025 16:38:24 +0100 Subject: [PATCH 19/21] remove concurrency for now --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55b4b6eb18..80023433b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,9 +6,9 @@ on: env: RAILS_ENV: production -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} +# concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: linting: From b255133cda456759a3625916bd981006a2687724 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Thu, 22 May 2025 10:09:51 +0100 Subject: [PATCH 20/21] parallelize --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 80023433b9..23f5f9f54b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,10 +60,12 @@ jobs: - name: Install Node Packages run: yarn install --frozen-lockfile - name: Setup DB - run: bundle exec rake db:test:prepare + run: | + bundle exec rake parallel:create + bundle exec rake parallel:setup - name: Refresh Materialized Views run: bundle exec rake db:refresh_matviews - name: Precompile assets run: bundle exec rake assets:precompile - name: Run Tests - run: bundle exec rspec + run: bundle exec rake parallel:spec From e814f30a5c719351a3ea068df950c7ee9fa13051 Mon Sep 17 00:00:00 2001 From: Owajigbanam Ogbuluijah Date: Thu, 22 May 2025 10:21:07 +0100 Subject: [PATCH 21/21] add prometheus_exporter client to Rakefile --- Rakefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Rakefile b/Rakefile index 3e01c2e0c0..94b4c57f26 100644 --- a/Rakefile +++ b/Rakefile @@ -2,6 +2,8 @@ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require_relative "config/application" +require "prometheus_exporter/client" + Rails.application.load_tasks def is_running_migration?