Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
solidus_admin:
uses: ./.github/workflows/test_solidus.yml
with:
artifacts: true
lib_name: admin
coverage: true
secrets:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/test_solidus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ name: "Test Solidus"
on:
workflow_call:
inputs:
artifacts:
description: "Whether to save test artifacts during the workflow run."
type: boolean
default: false
lib_name:
description: "The name of the Solidus library to test (e.g., core, backend, frontend)"
type: string
Expand Down Expand Up @@ -41,6 +45,7 @@ jobs:
database: postgres
storage: activestorage
env:
ARTIFACTS_DIR: ${{ github.workspace }}/${{ inputs.lib_name }}/artifacts
BUNDLE_WITHOUT: "lint release"
COVERAGE_DIR: ${{ github.workspace }}/${{ inputs.lib_name }}/coverage
DB: ${{ matrix.database }}
Expand Down Expand Up @@ -120,3 +125,10 @@ jobs:
slug: solidusio/solidus
disable_search: true
files: ${{ env.COVERAGE_DIR }}/coverage.xml
- name: Store test artifacts
uses: actions/upload-artifact@v7
if: failure() && inputs.artifacts
with:
name: test-artifacts-${{ inputs.lib_name }}-${{ matrix.database }}-${{ matrix.storage }}
path: ${{ env.ARTIFACTS_DIR }}
if-no-files-found: ignore
2 changes: 1 addition & 1 deletion admin/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
require "capybara-screenshot/rspec"
require "spree/testing_support/capybara_driver"

Capybara.save_path = ENV["CIRCLE_ARTIFACTS"] if ENV["CIRCLE_ARTIFACTS"]
Capybara.save_path = ENV["ARTIFACTS_DIR"] if ENV["ARTIFACTS_DIR"]
Capybara.exact = true
Capybara.disable_animation = true
Capybara.default_max_wait_time = ENV["DEFAULT_MAX_WAIT_TIME"].to_f if ENV["DEFAULT_MAX_WAIT_TIME"].present?
Expand Down
2 changes: 1 addition & 1 deletion backend/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
require "spree/testing_support/silence_deprecations"

require "capybara-screenshot/rspec"
Capybara.save_path = ENV["CIRCLE_ARTIFACTS"] if ENV["CIRCLE_ARTIFACTS"]
Capybara.save_path = ENV["ARTIFACTS_DIR"] if ENV["ARTIFACTS_DIR"]
Capybara.exact = true

require "spree/testing_support/capybara_driver"
Expand Down
Loading