-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cross Version Testing Locally and Faster CI (#8610)
Merge pull request 8610
- Loading branch information
1 parent
c9c9dc7
commit df24131
Showing
5 changed files
with
93 additions
and
65 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
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,49 @@ | ||
FROM alpine | ||
|
||
# Run locally: `earthly +all` to run full CI process | ||
all: | ||
BUILD --build-arg RUBY=3.0 +test | ||
BUILD --build-arg RUBY=2.7 +test | ||
BUILD --build-arg RUBY=2.5 +test | ||
BUILD --build-arg RUBY=jruby:9.2.14.0 +test | ||
BUILD style-check | ||
BUILD profile-docs | ||
|
||
# Run locally: `earthly +test` | ||
# Run with specific version: `earthly --build-arg RUBY=2.5 +test` | ||
test: | ||
FROM +deps | ||
RUN script/test | ||
RUN script/cucumber | ||
RUN script/default-site | ||
|
||
style-check: | ||
FROM +deps | ||
RUN script/fmt | ||
|
||
profile-docs: | ||
FROM +deps | ||
RUN bundle install --jobs 4 | ||
RUN script/profile-docs | ||
RUN script/memprof | ||
|
||
# Install dependencies and copy in source | ||
# used in above steps | ||
deps: | ||
ARG RUBY=3.0 | ||
IF case $RUBY in jruby*) ;; *) false; esac | ||
FROM $RUBY | ||
ENV JRUBY_OPTS="--dev -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-XX:CompileThreshold=10 -J-XX:ReservedCodeCacheSize=128M" | ||
ELSE | ||
FROM ruby:$RUBY | ||
END | ||
WORKDIR /src | ||
RUN apt-get update && apt-get install nodejs dnsutils git make coreutils g++ build-essential -y | ||
RUN gem install bundler | ||
RUN gem install sassc -v '2.4.0' --source 'https://rubygems.org/' | ||
COPY Gemfile . | ||
COPY jekyll.gemspec . | ||
COPY lib/jekyll/version.rb lib/jekyll/version.rb | ||
COPY test test | ||
RUN bundle install --jobs 4 | ||
COPY . . |
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