Skip to content

Commit 1bc47fc

Browse files
committed
Add legacy CI
1 parent e6c68ac commit 1bc47fc

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,41 @@ jobs:
157157
- run: script/run_build
158158
continue-on-error: ${{ matrix.allow_failure || false }}
159159

160+
legacy:
161+
name: Legacy Ruby Builds (${{ matrix.container.version }})
162+
runs-on: ubuntu-20.04
163+
container:
164+
image: ${{ matrix.container.tag }}
165+
options: ${{ matrix.container.options || '--add-host github-complains-if-this-is-empty.com:127.0.0.1' }}
166+
strategy:
167+
fail-fast: false
168+
matrix:
169+
include:
170+
# Rails 4.2 Builds >= 1.9.3
171+
- container:
172+
version: "2.1.9"
173+
tag: ghcr.io/rspec/docker-ci:2.1.9
174+
post: git config --global --add safe.directory `pwd`
175+
env:
176+
RAILS_VERSION: '~> 4.2.0'
177+
- container:
178+
version: "2.0"
179+
tag: ghcr.io/rspec/docker-ci:2.0.0
180+
env:
181+
RAILS_VERSION: '~> 4.2.0'
182+
- container:
183+
version: "1.9.3"
184+
tag: ghcr.io/rspec/docker-ci:1.9.3
185+
env:
186+
RAILS_VERSION: '~> 4.2.0'
187+
188+
env:
189+
LEGACY_CI: true
190+
JRUBY_OPTS: ${{ matrix.container.jruby_opts || '--dev' }}
191+
RAILS_VERSION: ${{ matrix.env.RAILS_VERSION }}
192+
steps:
193+
- uses: actions/checkout@v3
194+
- run: ${{ matrix.container.pre }}
195+
- run: script/legacy_setup.sh
196+
- run: ${{ matrix.container.post }}
197+
- run: script/run_build

script/legacy_setup.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
# This file was generated on 2023-06-26T13:27:27+01:00 from the rspec-dev repo.
3+
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
4+
5+
set -e
6+
source script/functions.sh
7+
8+
bundle install --standalone --binstubs --without coverage documentation
9+
10+
if [ -x ./bin/rspec ]; then
11+
echo "RSpec bin detected"
12+
else
13+
if [ -x ./exe/rspec ]; then
14+
cp ./exe/rspec ./bin/rspec
15+
echo "RSpec restored from exe"
16+
else
17+
echo "No RSpec bin available"
18+
exit 1
19+
fi
20+
fi

0 commit comments

Comments
 (0)