Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Update tests.yml
Damian Legawiec78a4562fc24b
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 7e8e8d3bb0..bc1d2434dc 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -40,20 +40,21 @@ jobs:uses: actions/cache@v4with:path: vendor/bundle- key: gems-${{ runner.os }}-ruby4.0-postgres-${{ hashFiles('Gemfile', '*.gemspec', 'common_spree_dependencies.rb', '*/*.gemspec') }}+ key: gems-${{ runner.os }}-ruby4.0-postgres-${{ hashFiles('backend/Gemfile.lock') }}restore-keys: |gems-${{ runner.os }}-ruby4.0-postgres-- name: Install root dependencies+ working-directory: backend/enginesrun: |- bundle config set --local path vendor/bundle+ bundle config set --local path ${{ github.workspace }}/vendor/bundlebundle install- name: Install all project dependenciesrun: |for project in core api admin emails sample; doecho "--- Installing gems for $project ---"- cd $project+ cd backend/engines/$projectbundle config set --local path ${{ github.workspace }}/vendor/bundlebundle installcd ${{ github.workspace }}@@ -78,20 +79,21 @@ jobs:uses: actions/cache@v4with:path: vendor/bundle- key: gems-${{ runner.os }}-ruby4.0-mysql-${{ hashFiles('Gemfile', '*.gemspec', 'common_spree_dependencies.rb', '*/*.gemspec') }}+ key: gems-${{ runner.os }}-ruby4.0-mysql-${{ hashFiles('backend/Gemfile.lock') }}restore-keys: |gems-${{ runner.os }}-ruby4.0-mysql-- name: Install root dependencies+ working-directory: backend/enginesrun: |- bundle config set --local path vendor/bundle+ bundle config set --local path ${{ github.workspace }}/vendor/bundlebundle install- name: Install all project dependenciesrun: |for project in core api admin emails sample; doecho "--- Installing gems for $project ---"- cd $project+ cd backend/engines/$projectbundle config set --local path ${{ github.workspace }}/vendor/bundlebundle installcd ${{ github.workspace }}@@ -154,7 +156,7 @@ jobs:uses: actions/cache@v4with:path: vendor/bundle- key: gems-${{ runner.os }}-ruby4.0-postgres-${{ hashFiles('Gemfile', '*.gemspec', 'common_spree_dependencies.rb', '*/*.gemspec') }}+ key: gems-${{ runner.os }}-ruby4.0-postgres-${{ hashFiles('backend/Gemfile.lock') }}restore-keys: |gems-${{ runner.os }}-ruby4.0-postgres-@@ -163,24 +165,25 @@ jobs:- name: Install dependenciesrun: |- bundle config set --local path vendor/bundle+ cd backend/engines+ bundle config set --local path ${{ github.workspace }}/vendor/bundlebundle installcd ${{ matrix.project }}bundle config set --local path ${{ github.workspace }}/vendor/bundlebundle install- name: Setup test app- working-directory: ${{ matrix.project }}+ working-directory: backend/engines/${{ matrix.project }}run: |if [[ "${{ matrix.project }}" == "core" || "${{ matrix.project }}" == "api" ]]; then- bundle exec --gemfile=${{ github.workspace }}/Gemfile rake test_app+ bundle exec --gemfile=${{ github.workspace }}/backend/engines/Gemfile rake test_appelsebundle exec rake test_appfi- name: Select shard specsid: specs- working-directory: ${{ matrix.project }}+ working-directory: backend/engines/${{ matrix.project }}run: |all_specs=($(find spec -name '*_spec.rb' | sort))total=${#all_specs[@]}@@ -195,7 +198,7 @@ jobs:echo "files=${shard_specs[*]}" >> "$GITHUB_OUTPUT"- name: Run tests- working-directory: ${{ matrix.project }}+ working-directory: backend/engines/${{ matrix.project }}run: |mkdir -p ${{ github.workspace }}/tmp/test-results/rspecbundle exec rspec \@@ -279,7 +282,7 @@ jobs:uses: actions/cache@v4with:path: vendor/bundle- key: gems-${{ runner.os }}-ruby4.0-mysql-${{ hashFiles('Gemfile', '*.gemspec', 'common_spree_dependencies.rb', '*/*.gemspec') }}+ key: gems-${{ runner.os }}-ruby4.0-mysql-${{ hashFiles('backend/Gemfile.lock') }}restore-keys: |gems-${{ runner.os }}-ruby4.0-mysql-@@ -288,24 +291,25 @@ jobs:- name: Install dependenciesrun: |- bundle config set --local path vendor/bundle+ cd backend/engines+ bundle config set --local path ${{ github.workspace }}/vendor/bundlebundle installcd ${{ matrix.project }}bundle config set --local path ${{ github.workspace }}/vendor/bundlebundle install- name: Setup test app- working-directory: ${{ matrix.project }}+ working-directory: backend/engines/${{ matrix.project }}run: |if [[ "${{ matrix.project }}" == "core" || "${{ matrix.project }}" == "api" ]]; then- bundle exec --gemfile=${{ github.workspace }}/Gemfile rake test_app+ bundle exec --gemfile=${{ github.workspace }}/backend/engines/Gemfile rake test_appelsebundle exec rake test_appfi- name: Select shard specsid: specs- working-directory: ${{ matrix.project }}+ working-directory: backend/engines/${{ matrix.project }}run: |all_specs=($(find spec -name '*_spec.rb' | sort))total=${#all_specs[@]}@@ -320,7 +324,7 @@ jobs:echo "files=${shard_specs[*]}" >> "$GITHUB_OUTPUT"- name: Run tests- working-directory: ${{ matrix.project }}+ working-directory: backend/engines/${{ matrix.project }}run: |mkdir -p ${{ github.workspace }}/tmp/test-results/rspecbundle exec rspec \@@ -367,22 +371,24 @@ jobs:uses: actions/cache@v4with:path: vendor/bundle- key: gems-${{ runner.os }}-ruby4.0-postgres-${{ hashFiles('Gemfile', '*.gemspec', 'common_spree_dependencies.rb', '*/*.gemspec') }}+ key: gems-${{ runner.os }}-ruby4.0-postgres-${{ hashFiles('backend/Gemfile.lock') }}restore-keys: |gems-${{ runner.os }}-ruby4.0-postgres-- name: Install dependencies+ working-directory: backend/enginesrun: |- bundle config set --local path vendor/bundle+ bundle config set --local path ${{ github.workspace }}/vendor/bundlebundle install- name: Run Brakeman- run: bin/brakeman.sh+ working-directory: backend+ run: bin/brakeman- name: Upload Brakeman reportsif: always()uses: actions/upload-artifact@v4with:name: brakeman-reports- path: brakeman-*.*+ path: backend/brakeman-*.*if-no-files-found: ignore