-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ISSUE-68] Improved Specs and Added Coverage Report (#70)
* Fix rails 4.2 failing specs * [ISSUE-66] Improved specs Added coverage report * [ISSUE-68] - Add linter, remove support ruby < 3.0 and rails < 6.1 * Apply Standard Ruby autofixes * [ISSUE-68] Fix github ci for cross-repos * Fix spec * Add/fix another set of spec and logic. Update standard.yml * Update Github CI to run tests on matrix of ruby/rails * Update readme * Added more specs and better logic for cache_prefix_key * Final mixed misc changes * One more update to README * Update .ruby to only read content * Update readme * Remove memoization of cache_key_prefix * Final misc touches * [ISSUE-68] - Removed concurrency option It does more bad than good in real world scenarios. Performance degrades. --------- Co-authored-by: standard-ruby-action[bot] <standard-ruby-action[bot]@users.noreply.github.com>
- Loading branch information
Showing
19 changed files
with
772 additions
and
1,021 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
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 |
---|---|---|
|
@@ -5,3 +5,5 @@ pkg/* | |
*DS_Store | ||
.ruby-version | ||
.tool-versions | ||
coverage | ||
.standard_todo.yml |
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,3 @@ | ||
fix: false | ||
parallel: true | ||
ruby_version: 3.0 |
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,74 @@ | ||
FROM bash AS base | ||
|
||
ENV LANG C.UTF-8 | ||
ENV LC_ALL C.UTF-8 | ||
ENV ASDF_DIR=/root/.asdf | ||
|
||
# Install dependencies | ||
RUN apk update && \ | ||
apk add --no-cache \ | ||
build-base \ | ||
git \ | ||
libffi-dev \ | ||
openssl-dev \ | ||
perl \ | ||
readline-dev \ | ||
tzdata \ | ||
yaml-dev \ | ||
zlib-dev | ||
|
||
RUN git clone https://github.com/asdf-vm/asdf.git /root/.asdf --branch v0.14.0 && \ | ||
. "$ASDF_DIR/asdf.sh" && \ | ||
asdf plugin add ruby | ||
|
||
## For parallelism, build in stages | ||
# Ruby 3.0.7 | ||
FROM base AS ruby-3.0.7 | ||
RUN . "$ASDF_DIR/asdf.sh" && \ | ||
asdf install ruby 3.0.7 && \ | ||
asdf global ruby 3.0.7 && \ | ||
gem install bundler | ||
|
||
# Ruby 3.1.4 | ||
FROM base AS ruby-3.1.4 | ||
RUN . "$ASDF_DIR/asdf.sh" && \ | ||
asdf install ruby 3.1.4 && \ | ||
asdf global ruby 3.1.4 && \ | ||
gem install bundler | ||
|
||
# Ruby 3.2.2 | ||
FROM base AS ruby-3.2.2 | ||
RUN . "$ASDF_DIR/asdf.sh" && \ | ||
asdf install ruby 3.2.2 && \ | ||
asdf global ruby 3.2.2 && \ | ||
gem install bundler | ||
|
||
# Ruby 3.3.4 | ||
FROM base AS ruby-3.3.4 | ||
RUN . "$ASDF_DIR/asdf.sh" && \ | ||
asdf install ruby 3.3.4 && \ | ||
asdf global ruby 3.3.4 && \ | ||
gem install bundler | ||
|
||
# Final Image with Application Code | ||
FROM base AS final | ||
|
||
# Copy and merge installed ASDF directory from ruby versions | ||
COPY --from=ruby-3.0.7 /root/.asdf /tmp/.asdf-3.0.7 | ||
COPY --from=ruby-3.1.4 /root/.asdf /tmp/.asdf-3.1.4 | ||
COPY --from=ruby-3.2.2 /root/.asdf /tmp/.asdf-3.2.2 | ||
COPY --from=ruby-3.3.4 /root/.asdf /tmp/.asdf-3.3.4 | ||
RUN cp -r /tmp/.asdf-3.0.7/* /root/.asdf/ && \ | ||
cp -r /tmp/.asdf-3.1.4/* /root/.asdf/ && \ | ||
cp -r /tmp/.asdf-3.2.2/* /root/.asdf/ && \ | ||
cp -r /tmp/.asdf-3.3.4/* /root/.asdf/ && \ | ||
rm -rf /tmp/.asdf* | ||
|
||
WORKDIR /app | ||
|
||
COPY gemfiles gemfiles | ||
COPY lib lib | ||
COPY spec spec | ||
COPY cached_resource.gemspec Gemfile Rakefile scripts/docker/run_tests.sh .standard.yml . | ||
|
||
CMD ["./run_tests.sh"] |
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
Oops, something went wrong.