Skip to content

Workflow file for this run

# This workflow runs the main test suite.
#
# This workflow is pimarily meant to be called by other workflows, but it can be run manually.
name: "🧪 ~ Run gem tests"
on:
workflow_call:
workflow_dispatch:
jobs:
test:
name: "🧪"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version:
- "3.2"
gem:
- "bullet_train"
- "bullet_train-api"
- "bullet_train-fields"
- "bullet_train-has_uuid"
- "bullet_train-incoming_webhooks"
- "bullet_train-integrations"
- "bullet_train-integrations-stripe"
- "bullet_train-obfuscates_id"
- "bullet_train-outgoing_webhooks"
- "bullet_train-roles"
- "bullet_train-scope_questions"
- "bullet_train-scope_validator"
- "bullet_train-sortable"
- "bullet_train-super_load_and_authorize_resource"
- "bullet_train-super_scaffolding"
- "bullet_train-themes"
- "bullet_train-themes-light"
- "bullet_train-themes-tailwind_css"
name: ${{ format('{0} / {1}', matrix.gem, matrix.ruby-version) }}

Check failure on line 38 in .github/workflows/_run_tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/_run_tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 38
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 2s
--health-timeout 2s
--health-retries 5
ports:
- 5432:5432
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: postgres
RAILS_ENV: test
defaults:
run:
working-directory: ${{ matrix.gem }}
steps:
- uses: "actions/checkout@v4"
- uses: "ruby/setup-ruby@v1"
with:
rubygems: latest
bundler: latest
bundler-cache: true
ruby-version: ${{ matrix.ruby-version }}
working-directory: ${{ matrix.gem }} # setup-ruby does't pick up the job default.
# TODO: Sometimes the step above complains about the lockfile being fronzen.
# When that happens you can get things moving again by chaning the bundler-cache
# option above to false. Then _must_ uncomment the line for `bundle install` and
# you can also uncomment the following lines to find out what changed unexpectedly.
# I _think_ I've got things set up so that this shouldn't be an issue any more, but
# I'm leaving this stuff here in case it comes in handy in the near future.
#
#- run: bundle install
#- run: cat Gemfile.lock
#- run: git diff Gemfile.lock
- run: bin/rails db:setup
if: ${{ hashFiles(format('{0}/test/dummy/db/schema.rb', matrix.gem)) != '' }}
- name: Run Tests
run: bin/rails test
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "test/reports/**/TEST-*.xml"
if: always()