> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# solidusio/extensions

An Orb that can be used by extensions to run specs against all the versions of Solidus and databases that we support.

## Commands

### dependencies

Install common system dependencies


### lint-code

Check code style


### run-tests

Cycle all Solidus versions and run specs


### run-tests-solidus-current

Test latest release of Solidus


| Parameter | Type | Default | Description |
|---|---|---|---|
| `working_directory` | string | ~/project |  |

### run-tests-solidus-main

Test the edge version of Solidus


| Parameter | Type | Default | Description |
|---|---|---|---|
| `working_directory` | string | ~/project |  |

### run-tests-solidus-older

Test older releases of Solidus


| Parameter | Type | Default | Description |
|---|---|---|---|
| `working_directory` | string | ~/project |  |

### store-test-results

Save test results


### test-branch

Runs tests for a specific Solidus branch.

| Parameter | Type | Default | Description |
|---|---|---|---|
| `branch` | string | main |  |
| `command` | string | bundle exec rake |  |
| `command_verb` | string | Runs tests |  |
| `rails_version` | string | ~> 7.0 |  |
| `working_directory` | string | ~/project |  |

## Executors

### mysql

Run specs with MySQL

| Parameter | Type | Default | Description |
|---|---|---|---|
| `mysql_version` | string | 5.7 |  |
| `ruby_version` | string | 3.0 |  |

### mysql-elasticsearch

Run specs with MySQL and ElasticSearch

| Parameter | Type | Default | Description |
|---|---|---|---|
| `elasticsearch_version` | string | 6.8.0 |  |
| `mysql_version` | string | 5.7 |  |
| `ruby_version` | string | 3.0 |  |

### postgres

Run specs with PostgreSQL

| Parameter | Type | Default | Description |
|---|---|---|---|
| `postgres_version` | string | 14.2 |  |
| `ruby_version` | string | 3.0 |  |

### postgres-elasticsearch

Run specs with PostgreSQL and ElasticSearch

| Parameter | Type | Default | Description |
|---|---|---|---|
| `elasticsearch_version` | string | 6.8.0 |  |
| `postgres_version` | string | 14.2 |  |
| `ruby_version` | string | 3.0 |  |

### sqlite

Run specs with an in-memory SQLite

| Parameter | Type | Default | Description |
|---|---|---|---|
| `ruby_version` | string | 3.0 |  |

### sqlite-memory

Run specs with an in-memory SQLite

| Parameter | Type | Default | Description |
|---|---|---|---|
| `ruby_version` | string | 3.0 |  |

## Examples

### extension

Copy/paste this code into the .circleci/config.yml of your extension.


```yaml
version: '2.1'
orbs:
  browser-tools: circleci/browser-tools@1.1
  solidusio_extensions: solidusio/extensions@volatile
jobs:
  run-specs-with-mysql:
    executor:
      name: solidusio_extensions/mysql
      ruby_version: '3.1'
    steps:
      - browser-tools/install-chrome
      - solidusio_extensions/run-tests
  run-specs-with-postgres:
    executor:
      name: solidusio_extensions/postgres
      ruby_version: '3.2'
    steps:
      - browser-tools/install-chrome
      - solidusio_extensions/run-tests
  run-specs-with-sqlite:
    executor:
      name: solidusio_extensions/sqlite
      ruby_version: '3.0'
    steps:
      - browser-tools/install-chrome
      - solidusio_extensions/run-tests
workflows:
  Run specs on supported Solidus versions:
    jobs:
      - run-specs-with-postgres
      - run-specs-with-mysql
      - run-specs-with-sqlite
      - lint-code
  Weekly run specs against main:
    jobs:
      - run-specs-with-sqlite
    triggers:
      - schedule:
          cron: 0 0 * * 4
          filters:
            branches:
              only:
                - main
```