-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test script to check each version of Ruby
- Loading branch information
Stephan Tarulli
committed
Feb 20, 2022
1 parent
321d5a8
commit 65f8851
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ARG VERSION | ||
FROM ruby:${VERSION} | ||
|
||
WORKDIR /workspace | ||
RUN mkdir -p lib/crockford32 | ||
COPY Gemfile Gemfile.lock crockford32.gemspec ./ | ||
COPY lib/crockford32/version.rb ./lib/crockford32/ | ||
RUN gem install bundler:2.3.3 && bundle install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
RUBY_VERSIONS=( | ||
2.6.0 | ||
2.6.9 | ||
2.7.0 | ||
2.7.5 | ||
3.0.0 | ||
3.0.3 | ||
3.1.0 | ||
) | ||
|
||
IMAGE_PREFIX="crockford32" | ||
|
||
for v in ${RUBY_VERSIONS[@]}; do | ||
docker build -t "${IMAGE_PREFIX}:${v}" --build-arg "VERSION=${v}" . | ||
done | ||
|
||
for v in ${RUBY_VERSIONS[@]}; do | ||
echo "Running tests for Ruby ${v}..." | ||
docker run --rm -ti -v "${PWD}:/workspace" "${IMAGE_PREFIX}:${v}" bundle exec rake | ||
done |