Skip to content

Commit 20d1c51

Browse files
committed
Test multiple prism versions in CI
1 parent dd1c2bd commit 20d1c51

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
35+
prism_version:
36+
- 1.2.0 # Shipped with Ruby 3.4 as default parser https://www.ruby-lang.org/en/news/2024/12/25/ruby-3-4-0-released/
37+
- 1.8.0
38+
- head
39+
env:
40+
PRISM_VERSION: ${{ matrix.prism_version }}
3541
steps:
3642
- name: Checkout code
3743
uses: actions/checkout@v6
@@ -40,6 +46,9 @@ jobs:
4046
with:
4147
ruby-version: ${{ matrix.ruby }}
4248
bundler-cache: true
49+
- name: Use latest prism version (head only)
50+
if: matrix.prism_version == 'head'
51+
run: bundle update prism
4352
- name: test
4453
run: bin/rake test
4554
continue-on-error: ${{ matrix.ruby == 'head' }}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## HEAD (unreleased)
22

3+
- Internal: Add tests to multiple versions of prism
4+
35
## 2.0.2
46

57
- Fix: Separate multiple parser errors by newline. (https://github.com/ruby/syntax_suggest/pull/232)

Gemfile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,12 @@ gem "standard"
1212
gem "ruby-prof"
1313

1414
gem "benchmark-ips"
15-
gem "prism"
15+
16+
case ENV["PRISM_VERSION"]&.strip&.downcase
17+
when "head"
18+
gem "prism", github: "ruby/prism"
19+
when nil, ""
20+
gem "prism"
21+
else
22+
gem "prism", ENV["PRISM_VERSION"]
23+
end

0 commit comments

Comments
 (0)