Skip to content

Commit be8b1d2

Browse files
committed
prettier
1 parent 323baae commit be8b1d2

3 files changed

Lines changed: 21 additions & 40 deletions

File tree

.github/workflows/test.yml

Lines changed: 16 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -25,56 +25,38 @@ jobs:
2525
# Make sure bundler is using the correct Ruby version
2626
ruby -v
2727
bundle install
28-
npm install prettier
28+
yarn install
2929
30-
- name: Rubocop
31-
run: bin/rubocop
32-
33-
- name: Sorbet Typecheck
34-
run: bin/typecheck
35-
36-
- name: Spellcheck
37-
run: bin/spellcheck
38-
39-
- name: Prettier (Format Check)
40-
run: npx prettier --check "**/*.{js,json,md}"
41-
42-
tapioca:
43-
name: Tapioca RBI Check
44-
runs-on: ubuntu-latest
45-
needs: [lint]
46-
steps:
47-
- uses: actions/checkout@v3
48-
49-
- name: Setup Ruby
50-
uses: ruby/setup-ruby@v1
51-
with:
52-
ruby-version: "3.3.6"
53-
bundler-cache: true
54-
55-
- name: Install dependencies
56-
run: |
57-
ruby -v
58-
bundle install
59-
6030
- name: Generate and verify RBI files
6131
run: |
6232
bundle exec tapioca gems --verify
6333
bundle exec tapioca dsl --verify
64-
34+
6535
- name: Check for RBI changes
6636
run: |
6737
# Check if there are any uncommitted changes to RBI files
6838
git status --porcelain sorbet/rbi/
6939
if [[ -n $(git status --porcelain sorbet/rbi/) ]]; then
70-
echo "Error: RBI files are out of date. Please run 'bundle exec tapioca gems' and 'bundle exec tapioca dsl' and commit the changes."
40+
echo "Error: RBI files are out of date. Please run 'tapioca gems' and 'tapioca dsl' and commit the changes."
7141
git diff sorbet/rbi/
7242
exit 1
7343
fi
7444
45+
- name: RuboCop
46+
run: bin/rubocop
47+
48+
- name: Sorbet Typecheck
49+
run: bin/typecheck
50+
51+
- name: CSpell (Spellcheck)
52+
run: bin/spellcheck
53+
54+
- name: Prettier (Check Formatting for .md, .yml, etc.)
55+
run: bin/prettier --check
56+
7557
test:
7658
name: "Tests: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}"
77-
needs: [lint, tapioca]
59+
needs: [lint]
7860
runs-on: ubuntu-22.04
7961
strategy:
8062
fail-fast: false

.rubocop.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,19 @@ Sorbet/FalseSigil:
7070
Sorbet/StrictSigil:
7171
Enabled: true
7272
Exclude:
73-
- 'test/**/*'
74-
- 'sorbet/**/*'
73+
- "test/**/*"
74+
- "sorbet/**/*"
7575
SuggestedStrictness: strict
7676

7777
# Require typed: true for test files
7878
Sorbet/TrueSigil:
7979
Enabled: true
8080
Include:
81-
- 'test/**/*.rb'
81+
- "test/**/*.rb"
8282
SuggestedStrictness: true
8383

8484
# Don't try to validate typing on generated Sorbet RBI files
8585
Sorbet:
8686
Enabled: true
8787
Exclude:
88-
- 'sorbet/**/*.rbi'
88+
- "sorbet/**/*.rbi"

bin/format renamed to bin/prettier

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
set -euo pipefail
33

44
# Format files using Prettier
5-
npx prettier --write "**/*.{js,json,md}"
6-
rubocop -A
5+
npx prettier . --write "$@"

0 commit comments

Comments
 (0)