From de3d8e4a23f03bd45d17b5dae4583997b75bdee1 Mon Sep 17 00:00:00 2001 From: Christian Mehlmauer Date: Mon, 17 Feb 2020 06:28:09 +0100 Subject: [PATCH] Use a build matrix --- .github/workflows/ruby.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index eb5200eb..bc8c5559 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -1,18 +1,24 @@ name: Ruby -on: [push] +on: [push, pull_request] jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + ruby: [2.4, 2.5, 2.6, 2.7, ruby-head] + steps: - uses: actions/checkout@v1 - - name: Set up Ruby 2.6 + + - name: Set up Ruby ${{ matrix.node }} uses: actions/setup-ruby@v1 with: - ruby-version: 2.6.x + ruby-version: ${{ matrix.node }} + - name: Cache gems uses: actions/cache@v1 with: @@ -20,15 +26,18 @@ jobs: key: ${{ runner.os }}-gem-${{ hashFiles('**/wpscan.gemspec') }} restore-keys: | ${{ runner.os }}-gem- + - name: Build and test run: | gem install bundler bundle config force_ruby_platform true bundle config path vendor/bundle bundle install --jobs 4 --retry 3 + - name: test run: | bundle exec rspec + - name: rubocop run: | bundle exec rubocop