Skip to content

Commit 37d1957

Browse files
committed
run a pilot build first before full matrix
1 parent 66fc4df commit 37d1957

1 file changed

Lines changed: 42 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,47 @@ jobs:
6363
- name: Sorbet (Typecheck)
6464
run: bin/typecheck
6565

66+
pilot:
67+
name: "Pilot Test: Ruby 3.0 / Rails 7.0"
68+
needs: [lint]
69+
runs-on: ubuntu-22.04
70+
env:
71+
RAILS_VERSION: "7.0"
72+
RUBY_VERSION: "3.0"
73+
steps:
74+
- uses: actions/checkout@v4
75+
76+
- name: Setup Ruby 3.0
77+
uses: ruby/setup-ruby@v1
78+
with:
79+
ruby-version: "3.0"
80+
bundler-cache: true
81+
82+
# For bundler to work with different Ruby versions
83+
- name: Set CI environment variable
84+
run: echo "CI=true" >> $GITHUB_ENV
85+
86+
- name: Install dependencies
87+
run: |
88+
ruby -v
89+
bundle config set --local without 'development'
90+
bundle install
91+
92+
- name: Run tests
93+
run: bin/test
94+
95+
# Save coverage data as an artifact
96+
- name: Upload coverage reports
97+
uses: actions/upload-artifact@v4
98+
if: success()
99+
with:
100+
name: coverage-pilot-ruby3.0-rails7.0
101+
path: coverage/
102+
retention-days: 5
103+
66104
test:
67105
name: "Tests: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}"
68-
needs: [lint]
106+
needs: [lint, pilot]
69107
runs-on: ubuntu-22.04
70108
strategy:
71109
fail-fast: false
@@ -78,6 +116,9 @@ jobs:
78116
rails: "8.0"
79117
- ruby: "3.0"
80118
rails: "8.0"
119+
# Exclude the pilot combination that we already ran
120+
- ruby: "3.0"
121+
rails: "7.0"
81122

82123
env:
83124
RAILS_VERSION: ${{ matrix.rails }}

0 commit comments

Comments
 (0)