-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #158 from skryukov/upstream-generators
Upstream generators
- Loading branch information
Showing
202 changed files
with
8,770 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
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: | ||
fail-fast: false | ||
matrix: | ||
framework: [react, vue, svelte, svelte4] | ||
typescript: [true, false] | ||
tailwind: [true, false] | ||
ruby: ['3.3'] | ||
node: ['22'] | ||
inertia_version: ['1.2.0', 'next', 'beta'] | ||
exclude: | ||
# 1.2.0 does not support typescript | ||
- typescript: true | ||
inertia_version: '1.2.0' | ||
# 1.2.0 doesn't support Svelte 5 | ||
- framework: svelte | ||
inertia_version: '1.2.0' | ||
|
||
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 | ||
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@v4 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
/.cache/ | ||
/Gemfile.lock | ||
|
||
/spec/dummy/db/*.sqlite3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
inherit_from: .rubocop_todo.yml | ||
|
||
AllCops: | ||
TargetRubyVersion: 3.0 | ||
NewCops: enable | ||
SuggestExtensions: false | ||
|
||
Metrics: | ||
Enabled: false | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/TrailingCommaInHashLiteral: | ||
EnforcedStyleForMultiline: consistent_comma |
Oops, something went wrong.