From 39dd94c29336bbc3b39dfae04a8500b48c59103e Mon Sep 17 00:00:00 2001 From: Gareth Jones <3151613+G-Rath@users.noreply.github.com> Date: Wed, 28 Jan 2026 10:10:56 +1300 Subject: [PATCH 1/4] feat(github): add a dedicated job for running ruby tests --- .../github_actions_ci/workflows/ci.yml.tt | 48 ++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/variants/github_actions_ci/workflows/ci.yml.tt b/variants/github_actions_ci/workflows/ci.yml.tt index 54be02b2..297a307a 100644 --- a/variants/github_actions_ci/workflows/ci.yml.tt +++ b/variants/github_actions_ci/workflows/ci.yml.tt @@ -99,14 +99,54 @@ jobs: uses: ruby/setup-ruby@v1 with: bundler-cache: true - - name: Check Run Ruby model annotations - run: bundle exec annotaterb models --frozen - name: Check Ruby controller annotations run: bundle exec chusaku --verbose --exit-with-error-on-annotation - run: bundle exec rubocop - run: bundle exec erb_lint . - run: bundle exec brakeman --run-all-checks . + ruby_based_tests: + permissions: + contents: read + runs-on: ubuntu-latest + timeout-minutes: 20 + services: + db: + image: postgres:latest + ports: ['5432:5432'] + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: postgres + options: >- + --health-cmd pg_isready --health-interval 10s --health-timeout 5s + --health-retries 5 + # Uncomment these if you need them for your test suite + # redis: + # image: redis:latest + # ports: + # - 6379:6379 + # elasticsearch: + # image: elasticsearch:latest + # env: + # cluster.name: whats-on-test-cluster + # discovery.type: single-node + # ES_JAVA_OPTS: '-Xms1g -Xmx1g' + # ports: + # - 9200:9200 + # - 9300:9300 + steps: + - name: Checkout Repo + uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Install Required OS Packages + run: sudo apt-get -yqq install libpq-dev + - name: Set up Ruby (version given by .ruby-version) + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true - run: bundle exec rails db:setup + - run: bundle exec annotaterb models --frozen - uses: actions/setup-node@v4 with: node-version-file: '.node-version' @@ -141,6 +181,7 @@ jobs: # needs: # - audit_dependencies # - ruby_based_checks + # - ruby_based_tests # - js_based_checks # uses: ./.github/workflows/deploy_to_ec2.yml # with: @@ -159,6 +200,7 @@ jobs: # needs: # - audit_dependencies # - ruby_based_checks + # - ruby_based_tests # - js_based_checks # uses: ./.github/workflows/deploy_to_ec2.yml # with: @@ -181,6 +223,7 @@ jobs: # needs: # - audit_dependencies # - ruby_based_checks + # - ruby_based_tests # - js_based_checks # uses: ./.github/workflows/deploy_to_heroku.yml # with: @@ -198,6 +241,7 @@ jobs: # needs: # - audit_dependencies # - ruby_based_checks + # - ruby_based_tests # - js_based_checks # uses: ./.github/workflows/deploy_to_heroku.yml # with: From b1c0c6f30dc28c2ed3a7d27bceaadb70f6429c79 Mon Sep 17 00:00:00 2001 From: Gareth Jones <3151613+G-Rath@users.noreply.github.com> Date: Wed, 28 Jan 2026 10:12:09 +1300 Subject: [PATCH 2/4] feat(github): don't install unneeded os packages --- variants/github_actions_ci/workflows/ci.yml.tt | 2 -- 1 file changed, 2 deletions(-) diff --git a/variants/github_actions_ci/workflows/ci.yml.tt b/variants/github_actions_ci/workflows/ci.yml.tt index 297a307a..9d0232d3 100644 --- a/variants/github_actions_ci/workflows/ci.yml.tt +++ b/variants/github_actions_ci/workflows/ci.yml.tt @@ -93,8 +93,6 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false - - name: Install Required OS Packages - run: sudo apt-get -yqq install libpq-dev - name: Set up Ruby (version given by .ruby-version) uses: ruby/setup-ruby@v1 with: From 5ef705ca0127d2419fef8a0bd89f169f7e989924 Mon Sep 17 00:00:00 2001 From: Gareth Jones <3151613+G-Rath@users.noreply.github.com> Date: Wed, 28 Jan 2026 10:12:24 +1300 Subject: [PATCH 3/4] feat(github): don't name controller annotate step --- variants/github_actions_ci/workflows/ci.yml.tt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/variants/github_actions_ci/workflows/ci.yml.tt b/variants/github_actions_ci/workflows/ci.yml.tt index 9d0232d3..4ac82b7e 100644 --- a/variants/github_actions_ci/workflows/ci.yml.tt +++ b/variants/github_actions_ci/workflows/ci.yml.tt @@ -97,8 +97,7 @@ jobs: uses: ruby/setup-ruby@v1 with: bundler-cache: true - - name: Check Ruby controller annotations - run: bundle exec chusaku --verbose --exit-with-error-on-annotation + - run: bundle exec chusaku --verbose --exit-with-error-on-annotation - run: bundle exec rubocop - run: bundle exec erb_lint . - run: bundle exec brakeman --run-all-checks . From 90a5c26ea3a4e5bda21d60cd50dc4126fcd12dab Mon Sep 17 00:00:00 2001 From: Gareth Jones <3151613+G-Rath@users.noreply.github.com> Date: Wed, 28 Jan 2026 10:12:37 +1300 Subject: [PATCH 4/4] feat(github): remove unneeded services --- .../github_actions_ci/workflows/ci.yml.tt | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/variants/github_actions_ci/workflows/ci.yml.tt b/variants/github_actions_ci/workflows/ci.yml.tt index 4ac82b7e..8b1e059c 100644 --- a/variants/github_actions_ci/workflows/ci.yml.tt +++ b/variants/github_actions_ci/workflows/ci.yml.tt @@ -63,31 +63,6 @@ jobs: contents: read runs-on: ubuntu-latest timeout-minutes: 20 - services: - db: - image: postgres:latest - ports: ['5432:5432'] - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - options: >- - --health-cmd pg_isready --health-interval 10s --health-timeout 5s - --health-retries 5 - # Uncomment these if you need them for your test suite - # redis: - # image: redis:latest - # ports: - # - 6379:6379 - # elasticsearch: - # image: elasticsearch:latest - # env: - # cluster.name: whats-on-test-cluster - # discovery.type: single-node - # ES_JAVA_OPTS: '-Xms1g -Xmx1g' - # ports: - # - 9200:9200 - # - 9300:9300 steps: - name: Checkout Repo uses: actions/checkout@v4