Skip to content

Commit 5518fb4

Browse files
committed
Enable Prettier on YAML
1 parent 4822de8 commit 5518fb4

File tree

21 files changed

+474
-483
lines changed

21 files changed

+474
-483
lines changed

.circleci/config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ jobs:
145145
paths:
146146
- node_modules
147147

148-
149148
# Install Node modules for dummy app with Yarn and save them to cache.
150149
install-dummy-app-node-packages:
151150
docker: *docker-image

.github/workflows/examples.yml

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
pull_request:
88

99
jobs:
10-
examples:
10+
examples:
1111
env:
1212
SKIP_YARN_COREPACK_CHECK: 0
1313
strategy:
@@ -16,79 +16,79 @@ jobs:
1616
versions: ['oldest', 'newest']
1717
runs-on: ubuntu-22.04
1818
steps:
19-
- uses: actions/checkout@v4
20-
with:
21-
persist-credentials: false
22-
- name: Get changed files
23-
id: changed-files
24-
uses: tj-actions/changed-files@v44
25-
with:
26-
files: |
27-
lib/generators/**
28-
rakelib/example_type.rb
29-
rakelib/example_config.yml
30-
rakelib/examples.rake
31-
rakelib/run_rspec.rake
32-
- name: Setup Ruby
33-
uses: ruby/setup-ruby@v1
34-
with:
35-
ruby-version: ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }}
36-
bundler: 2.5.9
37-
- name: Setup Node
38-
uses: actions/setup-node@v4
39-
with:
40-
node-version: 20
41-
- name: Print system information
42-
run: |
43-
echo "Linux release: "; cat /etc/issue
44-
echo "Current user: "; whoami
45-
echo "Current directory: "; pwd
46-
echo "Ruby version: "; ruby -v
47-
echo "Node version: "; node -v
48-
echo "Yarn version: "; yarn --version
49-
echo "Bundler version: "; bundle --version
50-
- name: run conversion script to support shakapacker v6
51-
if: matrix.versions == 'oldest'
52-
run: script/convert
53-
- name: Save root node_modules to cache
54-
uses: actions/cache@v4
55-
with:
56-
path: node_modules
57-
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
58-
- name: Save root ruby gems to cache
59-
uses: actions/cache@v4
60-
with:
61-
path: vendor/bundle
62-
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }}
63-
- id: get-sha
64-
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
65-
- name: Install Node modules with Yarn for renderer package
66-
run: |
67-
yarn install --no-progress --no-emoji
68-
sudo yarn global add yalc
69-
- name: yalc publish for react-on-rails
70-
run: yalc publish
71-
- name: Install Ruby Gems for package
72-
run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
73-
- name: Ensure minimum required Chrome version
74-
run: |
75-
echo -e "Already installed $(google-chrome --version)\n"
76-
MINIMUM_REQUIRED_CHROME_VERSION=75
77-
INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
78-
if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
79-
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
80-
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
81-
sudo apt-get update
82-
sudo apt-get install google-chrome-stable
83-
echo -e "\nInstalled $(google-chrome --version)"
84-
fi
85-
- name: Increase the amount of inotify watchers
86-
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
87-
- name: Main CI
88-
if: steps.changed-files.outputs.any_changed == 'true'
89-
run: bundle exec rake run_rspec:${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer_examples
90-
- name: Store test results
91-
uses: actions/upload-artifact@v4
92-
with:
93-
name: main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
94-
path: ~/rspec
19+
- uses: actions/checkout@v4
20+
with:
21+
persist-credentials: false
22+
- name: Get changed files
23+
id: changed-files
24+
uses: tj-actions/changed-files@v44
25+
with:
26+
files: |
27+
lib/generators/**
28+
rakelib/example_type.rb
29+
rakelib/example_config.yml
30+
rakelib/examples.rake
31+
rakelib/run_rspec.rake
32+
- name: Setup Ruby
33+
uses: ruby/setup-ruby@v1
34+
with:
35+
ruby-version: ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }}
36+
bundler: 2.5.9
37+
- name: Setup Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: 20
41+
- name: Print system information
42+
run: |
43+
echo "Linux release: "; cat /etc/issue
44+
echo "Current user: "; whoami
45+
echo "Current directory: "; pwd
46+
echo "Ruby version: "; ruby -v
47+
echo "Node version: "; node -v
48+
echo "Yarn version: "; yarn --version
49+
echo "Bundler version: "; bundle --version
50+
- name: run conversion script to support shakapacker v6
51+
if: matrix.versions == 'oldest'
52+
run: script/convert
53+
- name: Save root node_modules to cache
54+
uses: actions/cache@v4
55+
with:
56+
path: node_modules
57+
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
58+
- name: Save root ruby gems to cache
59+
uses: actions/cache@v4
60+
with:
61+
path: vendor/bundle
62+
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }}
63+
- id: get-sha
64+
run: echo "::set-output name=sha::$(git rev-parse HEAD)"
65+
- name: Install Node modules with Yarn for renderer package
66+
run: |
67+
yarn install --no-progress --no-emoji
68+
sudo yarn global add yalc
69+
- name: yalc publish for react-on-rails
70+
run: yalc publish
71+
- name: Install Ruby Gems for package
72+
run: bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
73+
- name: Ensure minimum required Chrome version
74+
run: |
75+
echo -e "Already installed $(google-chrome --version)\n"
76+
MINIMUM_REQUIRED_CHROME_VERSION=75
77+
INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
78+
if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
79+
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
80+
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
81+
sudo apt-get update
82+
sudo apt-get install google-chrome-stable
83+
echo -e "\nInstalled $(google-chrome --version)"
84+
fi
85+
- name: Increase the amount of inotify watchers
86+
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
87+
- name: Main CI
88+
if: steps.changed-files.outputs.any_changed == 'true'
89+
run: bundle exec rake run_rspec:${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer_examples
90+
- name: Store test results
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
94+
path: ~/rspec
Lines changed: 54 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Lint JS and Ruby
22

3-
43
on:
54
push:
65
branches:
@@ -11,57 +10,57 @@ jobs:
1110
build:
1211
runs-on: ubuntu-22.04
1312
steps:
14-
- uses: actions/checkout@v4
15-
with:
16-
persist-credentials: false
17-
- name: Setup Ruby
18-
uses: ruby/setup-ruby@v1
19-
with:
20-
ruby-version: 3
21-
bundler: 2.5.9
22-
- name: Setup Node
23-
uses: actions/setup-node@v4
24-
with:
25-
node-version: 20
26-
- name: Print system information
27-
run: |
28-
echo "Linux release: "; cat /etc/issue
29-
echo "Current user: "; whoami
30-
echo "Current directory: "; pwd
31-
echo "Ruby version: "; ruby -v
32-
echo "Node version: "; node -v
33-
echo "Yarn version: "; yarn --version
34-
echo "Bundler version: "; bundle --version
35-
- name: Save root node_modules to cache
36-
uses: actions/cache@v4
37-
with:
38-
path: node_modules
39-
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
40-
- name: Save root ruby gems to cache
41-
uses: actions/cache@v4
42-
with:
43-
path: vendor/bundle
44-
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-oldest
45-
- name: Install Node modules with Yarn for renderer package
46-
run: |
47-
yarn install --no-progress --no-emoji
48-
- name: Install Ruby Gems for package
49-
run: bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
50-
- name: Lint Ruby
51-
run: bundle exec rubocop
52-
- name: Install Node modules with Yarn for dummy app
53-
run: cd spec/dummy && yarn install --ignore-scripts --no-progress --no-emoji
54-
- name: Install Ruby Gems for dummy app
55-
run: cd spec/dummy && bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
56-
- name: generate file system-based packs
57-
run: cd spec/dummy && RAILS_ENV=test bundle exec rake react_on_rails:generate_packs
58-
- name: Detect dead code
59-
run: |
60-
yarn run knip
61-
yarn run knip --production
62-
- name: Lint JS
63-
run: yarn start lint
64-
- name: Check formatting
65-
run: yarn start format.listDifferent
66-
- name: Type-check TypeScript
67-
run: yarn run type-check
13+
- uses: actions/checkout@v4
14+
with:
15+
persist-credentials: false
16+
- name: Setup Ruby
17+
uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: 3
20+
bundler: 2.5.9
21+
- name: Setup Node
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
- name: Print system information
26+
run: |
27+
echo "Linux release: "; cat /etc/issue
28+
echo "Current user: "; whoami
29+
echo "Current directory: "; pwd
30+
echo "Ruby version: "; ruby -v
31+
echo "Node version: "; node -v
32+
echo "Yarn version: "; yarn --version
33+
echo "Bundler version: "; bundle --version
34+
- name: Save root node_modules to cache
35+
uses: actions/cache@v4
36+
with:
37+
path: node_modules
38+
key: v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
39+
- name: Save root ruby gems to cache
40+
uses: actions/cache@v4
41+
with:
42+
path: vendor/bundle
43+
key: package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-oldest
44+
- name: Install Node modules with Yarn for renderer package
45+
run: |
46+
yarn install --no-progress --no-emoji
47+
- name: Install Ruby Gems for package
48+
run: bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
49+
- name: Lint Ruby
50+
run: bundle exec rubocop
51+
- name: Install Node modules with Yarn for dummy app
52+
run: cd spec/dummy && yarn install --ignore-scripts --no-progress --no-emoji
53+
- name: Install Ruby Gems for dummy app
54+
run: cd spec/dummy && bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
55+
- name: generate file system-based packs
56+
run: cd spec/dummy && RAILS_ENV=test bundle exec rake react_on_rails:generate_packs
57+
- name: Detect dead code
58+
run: |
59+
yarn run knip
60+
yarn run knip --production
61+
- name: Lint JS
62+
run: yarn start lint
63+
- name: Check formatting
64+
run: yarn start format.listDifferent
65+
- name: Type-check TypeScript
66+
run: yarn run type-check

0 commit comments

Comments
 (0)