Skip to content

Commit 1d9c5e7

Browse files
committed
exclude rack and amazing_print from tapioca verification - different RBIs
1 parent be8b1d2 commit 1d9c5e7

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,25 @@ jobs:
2727
bundle install
2828
yarn install
2929
30-
- name: Generate and verify RBI files
30+
- name: CSpell (Spellcheck)
31+
run: bin/spellcheck
32+
33+
- name: Prettier (Formatting)
34+
run: bin/prettier --check
35+
36+
- name: Tapioca (Verify RBI files)
3137
run: |
38+
# Add a few excluded gems to tapioca config (different RBI on Mac vs. Linux)
39+
ruby -r yaml -e '
40+
CONFIG_FILE = "sorbet/tapioca/config.yml"
41+
config = YAML.load_file(CONFIG_FILE)
42+
config["gem"]["exclude"] += ["rack", "amazing_print"]
43+
config["gem"]["exclude"].sort!.uniq!
44+
File.write(CONFIG_FILE, config.to_yaml)
45+
'
3246
bundle exec tapioca gems --verify
3347
bundle exec tapioca dsl --verify
48+
git checkout sorbet/tapioca/config.yml || true
3449
3550
- name: Check for RBI changes
3651
run: |
@@ -42,18 +57,12 @@ jobs:
4257
exit 1
4358
fi
4459
45-
- name: RuboCop
60+
- name: RuboCop (Linting/Formatting)
4661
run: bin/rubocop
4762

48-
- name: Sorbet Typecheck
63+
- name: Sorbet (Typecheck)
4964
run: bin/typecheck
5065

51-
- name: CSpell (Spellcheck)
52-
run: bin/spellcheck
53-
54-
- name: Prettier (Check Formatting for .md, .yml, etc.)
55-
run: bin/prettier --check
56-
5766
test:
5867
name: "Tests: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}"
5968
needs: [lint]

bin/prettier

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
# Format files using Prettier
5-
npx prettier . --write "$@"
4+
PRETTIER_ARG="${1:---write}"
5+
6+
# Format / check files with Prettier
7+
npx prettier . "$PRETTIER_ARG"

0 commit comments

Comments
 (0)