Use a build matrix
This commit is contained in:
committed by
GitHub
parent
1502845d65
commit
de3d8e4a23
15
.github/workflows/ruby.yml
vendored
15
.github/workflows/ruby.yml
vendored
@@ -1,18 +1,24 @@
|
|||||||
name: Ruby
|
name: Ruby
|
||||||
|
|
||||||
on: [push]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
ruby: [2.4, 2.5, 2.6, 2.7, ruby-head]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Set up Ruby 2.6
|
|
||||||
|
- name: Set up Ruby ${{ matrix.node }}
|
||||||
uses: actions/setup-ruby@v1
|
uses: actions/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 2.6.x
|
ruby-version: ${{ matrix.node }}
|
||||||
|
|
||||||
- name: Cache gems
|
- name: Cache gems
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
@@ -20,15 +26,18 @@ jobs:
|
|||||||
key: ${{ runner.os }}-gem-${{ hashFiles('**/wpscan.gemspec') }}
|
key: ${{ runner.os }}-gem-${{ hashFiles('**/wpscan.gemspec') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gem-
|
${{ runner.os }}-gem-
|
||||||
|
|
||||||
- name: Build and test
|
- name: Build and test
|
||||||
run: |
|
run: |
|
||||||
gem install bundler
|
gem install bundler
|
||||||
bundle config force_ruby_platform true
|
bundle config force_ruby_platform true
|
||||||
bundle config path vendor/bundle
|
bundle config path vendor/bundle
|
||||||
bundle install --jobs 4 --retry 3
|
bundle install --jobs 4 --retry 3
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
run: |
|
run: |
|
||||||
bundle exec rspec
|
bundle exec rspec
|
||||||
|
|
||||||
- name: rubocop
|
- name: rubocop
|
||||||
run: |
|
run: |
|
||||||
bundle exec rubocop
|
bundle exec rubocop
|
||||||
|
|||||||
Reference in New Issue
Block a user