Skip to content

Update test.yml to be reusable #90

Update test.yml to be reusable

Update test.yml to be reusable #90

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 0 * * 4" # every Thursday
workflow_call:
concurrency:
group: test-${{ github.ref_name }}
permissions:
contents: read
jobs:
rspec:
name: Solidus ${{ matrix.solidus-branch }}, Rails ${{ matrix.rails-version }} and Ruby ${{ matrix.ruby-version }} on ${{ matrix.database }}
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
rails-version:
- "7.1"
- "7.2"
- "8.0"
ruby-version:
- "3.1"
- "3.4"
solidus-branch:
- "v4.3"
- "v4.4"
- "v4.5"
- "main"
database:
- "postgresql"
- "mysql"
- "sqlite"
exclude:
- solidus-branch: "main"
ruby-version: "3.1"
- rails-version: "7.2"
solidus-branch: "v4.3"
- ruby-version: "3.1"
rails-version: "8.0"
- solidus-branch: "v4.3"
rails-version: "8.0"
- solidus-branch: "v4.4"
rails-version: "8.0"
services:
postgres:
image: postgres:16
env:
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd="pg_isready"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 5432:5432
mysql:
image: mysql:8
env:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
ports:
- 3306:3306
steps:
- uses: actions/checkout@v4
- name: Run extension tests
uses: solidusio/test-solidus-extension@main
with:
database: ${{ matrix.database }}
rails-version: ${{ matrix.rails-version }}
ruby-version: ${{ matrix.ruby-version }}
solidus-branch: ${{ matrix.solidus-branch }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
continue-on-error: true
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage.xml