diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f953cf481..28bb32a67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,10 +11,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: workarea-commerce/ci/bundler-audit@v1 + + # Run Ruby-based static analysis on the same Ruby version as the rest of CI. + # The docker-based workarea-commerce/ci/* actions are pinned to ruby:2.6, + # which cannot bundle workarea-core (>= 2.7). + - uses: ruby/setup-ruby@v1 with: - args: '--ignore CVE-2020-8161' - - uses: workarea-commerce/ci/rubocop@v1 + ruby-version: 3.2 + bundler-cache: true + + - name: bundler-audit + run: bundle exec bundler-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' @@ -28,8 +39,11 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 3.2 bundler-cache: true + + - name: Ensure docker-compose is installed + run: sudo apt-get update && sudo apt-get install -y docker-compose - uses: workarea-commerce/ci/test@v1 with: command: cd admin && bin/rails test -b @@ -40,8 +54,11 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 3.2 bundler-cache: true + + - name: Ensure docker-compose is installed + run: sudo apt-get update && sudo apt-get install -y docker-compose - uses: workarea-commerce/ci/test@v1 with: command: cd admin && bin/rails teaspoon @@ -52,8 +69,11 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 3.2 bundler-cache: true + + - name: Ensure docker-compose is installed + run: sudo apt-get update && sudo apt-get install -y docker-compose - uses: workarea-commerce/ci/test@v1 with: command: cd admin && bin/rails test test/system/**/*_test.rb -b @@ -69,8 +89,11 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 3.2 bundler-cache: true + + - name: Ensure docker-compose is installed + run: sudo apt-get update && sudo apt-get install -y docker-compose - uses: workarea-commerce/ci/test@v1 with: command: cd core && bin/rails teaspoon @@ -81,8 +104,11 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 3.2 bundler-cache: true + + - name: Ensure docker-compose is installed + run: sudo apt-get update && sudo apt-get install -y docker-compose - uses: workarea-commerce/ci/test@v1 with: command: cd core && bin/rails test test/**/*_test.rb -b @@ -93,8 +119,11 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 3.2 bundler-cache: true + + - name: Ensure docker-compose is installed + run: sudo apt-get update && sudo apt-get install -y docker-compose - uses: workarea-commerce/ci/test@v1 with: command: cd storefront && bin/rails test -b @@ -105,8 +134,11 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 3.2 bundler-cache: true + + - name: Ensure docker-compose is installed + run: sudo apt-get update && sudo apt-get install -y docker-compose - uses: workarea-commerce/ci/test@v1 with: command: cd storefront && bin/rails teaspoon @@ -117,8 +149,11 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: 3.2 bundler-cache: true + + - name: Ensure docker-compose is installed + run: sudo apt-get update && sudo apt-get install -y docker-compose - uses: workarea-commerce/ci/test@v1 with: command: cd storefront && bin/rails test test/system/**/*_test.rb -b