Cross Version Testing Locally and Faster CI (#8610)

Merge pull request 8610
This commit is contained in:
Adam Bell
2021-03-25 20:47:13 -04:00
committed by GitHub
parent c9c9dc7dac
commit df24131349
5 changed files with 97 additions and 69 deletions

View File

@@ -23,49 +23,13 @@ jobs:
- 2.5
- 2.7
- 3.0
- jruby-9.2.14.0
- jruby:9.2.14.0
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Run Unit Tests
run: bash script/test
env:
CI: true
- name: Run Cucumber Features
run: bash script/cucumber
env:
CI: true
- name: Sanity Check
run: bash script/default-site
style_check:
if: "!contains(github.event.commits[0].message, '[ci skip]')"
name: 'Code Style Check (Ruby ${{ matrix.ruby_version }})'
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
ruby_version:
- 2.5
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
- name: Run RuboCop
run: bash script/fmt
- uses: actions/checkout@v2
- name: Download released earth
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.5.7/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Execute tests
run: earthly --build-arg RUBY=${{ matrix.ruby_version }} +test
profile_docs:
if: "!contains(github.event.commits[0].message, '[ci skip]')"
name: 'Profile Docs Site (Ruby ${{ matrix.ruby_version }})'
@@ -76,29 +40,23 @@ jobs:
ruby_version:
- 2.4 # Minimum required Ruby version in gemspec
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 5
- name: "Set up Ruby ${{ matrix.ruby_version }}"
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
- name: Cache dependencies
uses: actions/cache@v2.1.3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: 'Update Rubygems and Bundler'
run: |
gem update --system --no-document
gem update bundler --no-document
- name: Set up bundle
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Build Docs site with --profile
run: bash script/profile-docs
- name: Profile memory usage of building Docs site
run: bash script/memprof
- uses: actions/checkout@v2
- name: Download released earth
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.5.7/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Execute tests
run: earthly --build-arg RUBY=${{ matrix.ruby_version }} +profile-docs
style_check:
if: "!contains(github.event.commits[0].message, '[ci skip]')"
name: 'Style Check (Ruby ${{ matrix.ruby_version }})'
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
ruby_version:
- 2.5
steps:
- uses: actions/checkout@v2
- name: Download released earth
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.5.7/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Execute tests
run: earthly --build-arg RUBY=${{ matrix.ruby_version }} +style-check