Skip to content

Upstream generators

Upstream generators #8

Workflow file for this run

name: Test Generators
on:
push:
branches:
- master
paths:
- 'lib/generators/**'
- '.github/workflows/generators.yml'
- 'lib/inertia_rails/generators/**'
pull_request:
paths:
- 'lib/generators/**'
- '.github/workflows/generators.yml'
- 'lib/inertia_rails/generators/**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
framework: [react, vue, svelte4, svelte]
typescript: [true, false]
tailwind: [true, false]
ruby: ['3.3']
node: ['22']
inertia_version: ['latest', 'next']
name: ${{ matrix.framework }} (TS:${{ matrix.typescript }}, TW:${{ matrix.tailwind }}, Inertia:${{ matrix.inertia_version }})
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
tmp/bundle_cache
tmp/npm_cache
~/.npm
key: ${{ runner.os }}-deps-${{ matrix.framework }}-${{ matrix.inertia_version }}-${{ hashFiles('**/Gemfile.lock') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-deps-${{ matrix.framework }}-
${{ runner.os }}-deps-
- name: Install Rails
run: gem install rails
- name: Run test script
continue-on-error: ${{ matrix.typescript && matrix.inertia_version == 'latest' }}
run: |
ts_flag=${{ matrix.typescript && '--typescript' || '--no-typescript' }}
tw_flag=${{ matrix.tailwind && '--tailwind' || '--no-tailwind' }}
bin/generate_scaffold_example --framework=${{ matrix.framework }} --inertia-version=${{ matrix.inertia_version }} $ts_flag $tw_flag
- name: Upload test artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
name: test-output-${{ matrix.framework }}-ts${{ matrix.typescript }}-tw${{ matrix.tailwind }}-v${{ matrix.inertia_version }}
path: |
tmp/scaffold_example/log
tmp/scaffold_example/tmp/screenshots
if-no-files-found: ignore