|
1 | 1 | version: 2.1 |
2 | 2 |
|
3 | 3 | orbs: |
| 4 | + # Required for feature specs. |
| 5 | + browser-tools: circleci/browser-tools@1.1 |
| 6 | + |
4 | 7 | # Always take the latest version of the orb, this allows us to |
5 | 8 | # run specs against Solidus supported versions only without the need |
6 | 9 | # to change this configuration every time a Solidus version is released |
7 | 10 | # or goes EOL. |
8 | 11 | solidusio_extensions: solidusio/extensions@volatile |
9 | 12 |
|
10 | 13 | jobs: |
11 | | - run-specs-with-postgres: |
12 | | - executor: solidusio_extensions/postgres |
| 14 | + run-specs: |
| 15 | + parameters: |
| 16 | + solidus: |
| 17 | + type: string |
| 18 | + default: main |
| 19 | + db: |
| 20 | + type: string |
| 21 | + default: "postgres" |
| 22 | + ruby: |
| 23 | + type: string |
| 24 | + default: "3.2" |
| 25 | + executor: |
| 26 | + name: solidusio_extensions/<< parameters.db >> |
| 27 | + ruby_version: << parameters.ruby >> |
13 | 28 | steps: |
14 | | - - solidusio_extensions/run-tests |
15 | | - run-specs-with-mysql: |
16 | | - executor: solidusio_extensions/mysql |
| 29 | + - checkout |
| 30 | + - browser-tools/install-chrome |
| 31 | + - solidusio_extensions/run-tests-solidus-<< parameters.solidus >> |
| 32 | + |
| 33 | + lint-code: |
| 34 | + executor: |
| 35 | + name: solidusio_extensions/sqlite |
| 36 | + ruby_version: "3.2" |
17 | 37 | steps: |
18 | | - - solidusio_extensions/run-tests |
| 38 | + - solidusio_extensions/lint-code |
19 | 39 |
|
20 | 40 | workflows: |
21 | 41 | "Run specs on supported Solidus versions": |
22 | 42 | jobs: |
23 | | - - run-specs-with-postgres |
24 | | - - run-specs-with-mysql |
25 | | - "Weekly run specs against master": |
| 43 | + - run-specs: |
| 44 | + name: &name "run-specs-solidus-<< matrix.solidus >>-ruby-<< matrix.ruby >>-db-<< matrix.db >>" |
| 45 | + matrix: |
| 46 | + parameters: { solidus: ["main"], ruby: ["3.2"], db: ["postgres"] } |
| 47 | + - run-specs: |
| 48 | + name: *name |
| 49 | + matrix: |
| 50 | + parameters: { solidus: ["current"], ruby: ["3.1"], db: ["mysql"] } |
| 51 | + - run-specs: |
| 52 | + name: *name |
| 53 | + matrix: |
| 54 | + parameters: { solidus: ["older"], ruby: ["3.1"], db: ["sqlite"] } |
| 55 | + - lint-code |
| 56 | + |
| 57 | + "Weekly run specs against main": |
26 | 58 | triggers: |
27 | 59 | - schedule: |
28 | 60 | cron: "0 0 * * 4" # every Thursday |
29 | 61 | filters: |
30 | 62 | branches: |
31 | 63 | only: |
32 | | - - master |
| 64 | + - main |
33 | 65 | jobs: |
34 | | - - run-specs-with-postgres |
35 | | - - run-specs-with-mysql |
| 66 | + - run-specs: |
| 67 | + name: *name |
| 68 | + matrix: |
| 69 | + parameters: { solidus: ["main"], ruby: ["3.2"], db: ["postgres"] } |
| 70 | + - run-specs: |
| 71 | + name: *name |
| 72 | + matrix: |
| 73 | + parameters: { solidus: ["current"], ruby: ["3.1"], db: ["mysql"] } |
0 commit comments