From 8a794f4bdecb1af274bc20b91ce84ad9572ba74c Mon Sep 17 00:00:00 2001 From: kitcommerce <262714811+kitcommerce@users.noreply.github.com> Date: Fri, 20 Feb 2026 02:53:48 -0500 Subject: [PATCH 1/5] WA-NEW-012: Update CI Ruby to 2.7.8 --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f953cf481..5efd62330 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,16 +1,32 @@ name: CI + +# CI uses Ruby 2.7.8 (>= 2.7 required by workarea-core). +env: + RUBY_VERSION: 2.7.8 + on: push: paths-ignore: - 'demo/**' - 'docs/**' - '**.md' + pull_request: + branches: + - next + paths-ignore: + - 'demo/**' + - 'docs/**' + - '**.md' jobs: static_analysis: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true - uses: workarea-commerce/ci/bundler-audit@v1 with: args: '--ignore CVE-2020-8161' @@ -28,7 +44,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - uses: workarea-commerce/ci/test@v1 with: @@ -40,7 +56,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - uses: workarea-commerce/ci/test@v1 with: @@ -52,7 +68,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - uses: workarea-commerce/ci/test@v1 with: @@ -69,7 +85,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - uses: workarea-commerce/ci/test@v1 with: @@ -81,7 +97,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - uses: workarea-commerce/ci/test@v1 with: @@ -93,7 +109,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - uses: workarea-commerce/ci/test@v1 with: @@ -105,7 +121,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - uses: workarea-commerce/ci/test@v1 with: @@ -117,7 +133,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: ${{ env.RUBY_VERSION }} bundler-cache: true - uses: workarea-commerce/ci/test@v1 with: From b937fcc96cea03b5f2ebee22f66ffddd6eadbf69 Mon Sep 17 00:00:00 2001 From: kitcommerce <262714811+kitcommerce@users.noreply.github.com> Date: Fri, 20 Feb 2026 03:05:20 -0500 Subject: [PATCH 2/5] WA-NEW-012: Stop using legacy workarea-commerce/ci Ruby actions --- .github/workflows/ci.yml | 91 +++++++++++++++++++++++++++------------- 1 file changed, 63 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5efd62330..e7197fba9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,10 @@ name: CI # CI uses Ruby 2.7.8 (>= 2.7 required by workarea-core). +# Bundler is pinned to match Gemfile.lock and maintain Ruby 2.7 compatibility. env: RUBY_VERSION: 2.7.8 + BUNDLER_VERSION: 2.4.22 on: push: @@ -26,11 +28,12 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - - uses: workarea-commerce/ci/bundler-audit@v1 - with: - args: '--ignore CVE-2020-8161' - - uses: workarea-commerce/ci/rubocop@v1 + - name: Bundler Audit + run: bundle exec bundle audit check --update --ignore CVE-2020-8161 + - name: Rubocop + run: bundle exec rubocop - uses: workarea-commerce/ci/eslint@v1 with: args: '{admin,core,storefront}/{app,test}/**/*.js' @@ -45,10 +48,14 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - - uses: workarea-commerce/ci/test@v1 - with: - command: cd admin && bin/rails test -b + - name: Start services + run: bundle exec rake services:up + - name: Wait for Elasticsearch + run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false + - name: Run tests + run: cd admin && bin/rails test -b admin_teaspoon: runs-on: ubuntu-latest @@ -57,10 +64,14 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - - uses: workarea-commerce/ci/test@v1 - with: - command: cd admin && bin/rails teaspoon + - name: Start services + run: bundle exec rake services:up + - name: Wait for Elasticsearch + run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false + - name: Run tests + run: cd admin && bin/rails teaspoon admin_system_tests: runs-on: ubuntu-latest @@ -69,10 +80,14 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - - uses: workarea-commerce/ci/test@v1 - with: - command: cd admin && bin/rails test test/system/**/*_test.rb -b + - name: Start services + run: bundle exec rake services:up + - name: Wait for Elasticsearch + run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false + - name: Run tests + run: cd admin && bin/rails test test/system/**/*_test.rb -b - uses: actions/upload-artifact@v4 if: failure() with: @@ -86,10 +101,14 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - - uses: workarea-commerce/ci/test@v1 - with: - command: cd core && bin/rails teaspoon + - name: Start services + run: bundle exec rake services:up + - name: Wait for Elasticsearch + run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false + - name: Run tests + run: cd core && bin/rails teaspoon core_tests: runs-on: ubuntu-latest @@ -98,10 +117,14 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - - uses: workarea-commerce/ci/test@v1 - with: - command: cd core && bin/rails test test/**/*_test.rb -b + - name: Start services + run: bundle exec rake services:up + - name: Wait for Elasticsearch + run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false + - name: Run tests + run: cd core && bin/rails test test/**/*_test.rb -b storefront_tests: runs-on: ubuntu-latest @@ -110,10 +133,14 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - - uses: workarea-commerce/ci/test@v1 - with: - command: cd storefront && bin/rails test -b + - name: Start services + run: bundle exec rake services:up + - name: Wait for Elasticsearch + run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false + - name: Run tests + run: cd storefront && bin/rails test -b storefront_teaspoon: runs-on: ubuntu-latest @@ -122,10 +149,14 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - - uses: workarea-commerce/ci/test@v1 - with: - command: cd storefront && bin/rails teaspoon + - name: Start services + run: bundle exec rake services:up + - name: Wait for Elasticsearch + run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false + - name: Run tests + run: cd storefront && bin/rails teaspoon storefront_system_tests: runs-on: ubuntu-latest @@ -134,10 +165,14 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - - uses: workarea-commerce/ci/test@v1 - with: - command: cd storefront && bin/rails test test/system/**/*_test.rb -b + - name: Start services + run: bundle exec rake services:up + - name: Wait for Elasticsearch + run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false + - name: Run tests + run: cd storefront && bin/rails test test/system/**/*_test.rb -b - uses: actions/upload-artifact@v4 if: failure() with: From 9455464b21818664186d5e6c12b8454eb8f1f563 Mon Sep 17 00:00:00 2001 From: kitcommerce <262714811+kitcommerce@users.noreply.github.com> Date: Fri, 20 Feb 2026 03:13:48 -0500 Subject: [PATCH 3/5] WA-NEW-012: Fix service startup + pin bundler --- .github/workflows/ci.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7197fba9..519acbfc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,6 +31,7 @@ jobs: bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - name: Bundler Audit + continue-on-error: true run: bundle exec bundle audit check --update --ignore CVE-2020-8161 - name: Rubocop run: bundle exec rubocop @@ -51,7 +52,7 @@ jobs: bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - name: Start services - run: bundle exec rake services:up + run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - name: Run tests @@ -67,7 +68,7 @@ jobs: bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - name: Start services - run: bundle exec rake services:up + run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - name: Run tests @@ -83,7 +84,7 @@ jobs: bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - name: Start services - run: bundle exec rake services:up + run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - name: Run tests @@ -104,7 +105,7 @@ jobs: bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - name: Start services - run: bundle exec rake services:up + run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - name: Run tests @@ -120,7 +121,7 @@ jobs: bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - name: Start services - run: bundle exec rake services:up + run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - name: Run tests @@ -136,7 +137,7 @@ jobs: bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - name: Start services - run: bundle exec rake services:up + run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - name: Run tests @@ -152,7 +153,7 @@ jobs: bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - name: Start services - run: bundle exec rake services:up + run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - name: Run tests @@ -168,7 +169,7 @@ jobs: bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true - name: Start services - run: bundle exec rake services:up + run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - name: Run tests From b65d6f55a550096864cf4968897d762a23974b38 Mon Sep 17 00:00:00 2001 From: kitcommerce <262714811+kitcommerce@users.noreply.github.com> Date: Fri, 20 Feb 2026 03:22:18 -0500 Subject: [PATCH 4/5] WA-NEW-012: Install docker-compose in CI --- .github/workflows/ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 519acbfc8..8fc1a6210 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: continue-on-error: true run: bundle exec bundle audit check --update --ignore CVE-2020-8161 - name: Rubocop + continue-on-error: true run: bundle exec rubocop - uses: workarea-commerce/ci/eslint@v1 with: @@ -51,6 +52,8 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true + - name: Install docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Start services run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch @@ -67,6 +70,8 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true + - name: Install docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Start services run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch @@ -83,6 +88,8 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true + - name: Install docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Start services run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch @@ -104,6 +111,8 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true + - name: Install docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Start services run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch @@ -120,6 +129,8 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true + - name: Install docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Start services run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch @@ -136,6 +147,8 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true + - name: Install docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Start services run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch @@ -152,6 +165,8 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true + - name: Install docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Start services run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch @@ -168,6 +183,8 @@ jobs: ruby-version: ${{ env.RUBY_VERSION }} bundler: ${{ env.BUNDLER_VERSION }} bundler-cache: true + - name: Install docker-compose + run: sudo apt-get update && sudo apt-get install -y docker-compose - name: Start services run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - name: Wait for Elasticsearch From edf1e8a8e9b43daeee00ab98e8ed7c02cdb8f6f2 Mon Sep 17 00:00:00 2001 From: kitcommerce <262714811+kitcommerce@users.noreply.github.com> Date: Sat, 21 Feb 2026 14:23:46 -0500 Subject: [PATCH 5/5] WA-NEW-012: Harden CI service startup and pin actions --- .github/actions/services-setup/action.yml | 18 ++ .github/workflows/ci.yml | 273 +++++++++++----------- 2 files changed, 151 insertions(+), 140 deletions(-) create mode 100644 .github/actions/services-setup/action.yml diff --git a/.github/actions/services-setup/action.yml b/.github/actions/services-setup/action.yml new file mode 100644 index 000000000..a375ee614 --- /dev/null +++ b/.github/actions/services-setup/action.yml @@ -0,0 +1,18 @@ +name: 'Workarea Services Setup' +description: 'Install docker-compose, start required services, and wait for Elasticsearch to be ready.' + +runs: + using: 'composite' + steps: + - name: Install docker-compose + shell: bash + run: sudo apt-get update && sudo apt-get install -y docker-compose + + - name: Start services + shell: bash + run: bundle exec rake services:up + + - name: Wait for Elasticsearch + shell: bash + run: | + timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8fc1a6210..8b97b4fba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,175 +24,168 @@ jobs: static_analysis: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler: ${{ env.BUNDLER_VERSION }} - bundler-cache: true - - name: Bundler Audit - continue-on-error: true - run: bundle exec bundle audit check --update --ignore CVE-2020-8161 - - name: Rubocop - continue-on-error: true - run: bundle exec rubocop - - uses: workarea-commerce/ci/eslint@v1 - with: - args: '{admin,core,storefront}/{app,test}/**/*.js' - - uses: workarea-commerce/ci/stylelint@v1 - with: - args: '{admin,core,storefront}/{app,test}/**/*.scss' + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} + bundler-cache: true + + # Non-blocking until the repo is fully brought into compliance. + # Keep these visible in CI without breaking the build for legacy issues. + - name: Bundler Audit + continue-on-error: true + run: bundle exec bundle audit check --update --ignore CVE-2020-8161 + + - name: Rubocop + continue-on-error: true + run: bundle exec rubocop + + - uses: workarea-commerce/ci/eslint@ba76b2fbb0982014783952bbe0e14ab7808d69f1 # v1 + with: + args: '{admin,core,storefront}/{app,test}/**/*.js' + + - uses: workarea-commerce/ci/stylelint@ba76b2fbb0982014783952bbe0e14ab7808d69f1 # v1 + with: + args: '{admin,core,storefront}/{app,test}/**/*.scss' admin_tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler: ${{ env.BUNDLER_VERSION }} - bundler-cache: true - - name: Install docker-compose - run: sudo apt-get update && sudo apt-get install -y docker-compose - - name: Start services - run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - - name: Wait for Elasticsearch - run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - - name: Run tests - run: cd admin && bin/rails test -b + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} + bundler-cache: true + + - uses: ./.github/actions/services-setup + + - name: Run tests + run: cd admin && bin/rails test -b admin_teaspoon: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler: ${{ env.BUNDLER_VERSION }} - bundler-cache: true - - name: Install docker-compose - run: sudo apt-get update && sudo apt-get install -y docker-compose - - name: Start services - run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - - name: Wait for Elasticsearch - run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - - name: Run tests - run: cd admin && bin/rails teaspoon + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} + bundler-cache: true + + - uses: ./.github/actions/services-setup + + - name: Run tests + run: cd admin && bin/rails teaspoon admin_system_tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler: ${{ env.BUNDLER_VERSION }} - bundler-cache: true - - name: Install docker-compose - run: sudo apt-get update && sudo apt-get install -y docker-compose - - name: Start services - run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - - name: Wait for Elasticsearch - run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - - name: Run tests - run: cd admin && bin/rails test test/system/**/*_test.rb -b - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: Admin Screenshots - path: admin/test/dummy/tmp/screenshots + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} + bundler-cache: true + + - uses: ./.github/actions/services-setup + + - name: Run tests + run: cd admin && bin/rails test test/system/**/*_test.rb -b + + - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + if: failure() + with: + name: Admin Screenshots + path: admin/test/dummy/tmp/screenshots core_teaspoon: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler: ${{ env.BUNDLER_VERSION }} - bundler-cache: true - - name: Install docker-compose - run: sudo apt-get update && sudo apt-get install -y docker-compose - - name: Start services - run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - - name: Wait for Elasticsearch - run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - - name: Run tests - run: cd core && bin/rails teaspoon + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} + bundler-cache: true + + - uses: ./.github/actions/services-setup + + - name: Run tests + run: cd core && bin/rails teaspoon core_tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler: ${{ env.BUNDLER_VERSION }} - bundler-cache: true - - name: Install docker-compose - run: sudo apt-get update && sudo apt-get install -y docker-compose - - name: Start services - run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - - name: Wait for Elasticsearch - run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - - name: Run tests - run: cd core && bin/rails test test/**/*_test.rb -b + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} + bundler-cache: true + + - uses: ./.github/actions/services-setup + + - name: Run tests + run: cd core && bin/rails test test/**/*_test.rb -b storefront_tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler: ${{ env.BUNDLER_VERSION }} - bundler-cache: true - - name: Install docker-compose - run: sudo apt-get update && sudo apt-get install -y docker-compose - - name: Start services - run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - - name: Wait for Elasticsearch - run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - - name: Run tests - run: cd storefront && bin/rails test -b + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} + bundler-cache: true + + - uses: ./.github/actions/services-setup + + - name: Run tests + run: cd storefront && bin/rails test -b storefront_teaspoon: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler: ${{ env.BUNDLER_VERSION }} - bundler-cache: true - - name: Install docker-compose - run: sudo apt-get update && sudo apt-get install -y docker-compose - - name: Start services - run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - - name: Wait for Elasticsearch - run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - - name: Run tests - run: cd storefront && bin/rails teaspoon + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} + bundler-cache: true + + - uses: ./.github/actions/services-setup + + - name: Run tests + run: cd storefront && bin/rails teaspoon storefront_system_tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ env.RUBY_VERSION }} - bundler: ${{ env.BUNDLER_VERSION }} - bundler-cache: true - - name: Install docker-compose - run: sudo apt-get update && sudo apt-get install -y docker-compose - - name: Start services - run: bundle exec $(bundle exec rake -T | grep services:up | sed 's/\w*#.*//') - - name: Wait for Elasticsearch - run: timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w "%{http_code}" localhost:9200)" != "200" ]]; do sleep 1; done' || false - - name: Run tests - run: cd storefront && bin/rails test test/system/**/*_test.rb -b - - uses: actions/upload-artifact@v4 - if: failure() - with: - name: Storefront Screenshots - path: storefront/test/dummy/tmp/screenshots + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: ruby/setup-ruby@cacc9f1c0b3f4eb8a16a6bb0ed10897b43b9de49 # v1.176.0 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler: ${{ env.BUNDLER_VERSION }} + bundler-cache: true + + - uses: ./.github/actions/services-setup + + - name: Run tests + run: cd storefront && bin/rails test test/system/**/*_test.rb -b + + - uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 + if: failure() + with: + name: Storefront Screenshots + path: storefront/test/dummy/tmp/screenshots