Skip to content

Commit

Permalink
updating workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Esity committed Jun 8, 2021
1 parent eaf5c51 commit f0b1336
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 36 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: RSpec
on: [push, pull_request]

jobs:
rspec:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: [2.7]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: RSpec run
run: |
bash -c "
bundle exec rspec
[[ $? -ne 2 ]]
"
rspec-mri:
needs: rspec
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
ruby: [2.4, 2.5, 2.6, '3.0', head]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rspec
rspec-jruby:
needs: rspec
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
ruby: [ jruby, jruby-head]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: JRUBY_OPTS="--debug" bundle exec rspec
rspec-truffleruby:
needs: rspec
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
ruby: [truffleruby]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rspec

59 changes: 23 additions & 36 deletions .github/workflows/rubocop-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,28 @@
name: "Rubocop"

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '41 13 * * 4'

name: Rubocop
on: [push, pull_request]
jobs:
rubocop:
runs-on: ubuntu-latest
strategy:
fail-fast: false

matrix:
os: [ubuntu-latest]
ruby: [2.7]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6

- name: Install Code Scanning integration
run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install

- name: Install dependencies
run: bundle install

- name: Rubocop run
run: |
bash -c "
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
[[ $? -ne 2 ]]
"
- name: Upload Sarif output
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: rubocop.sarif
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Install Rubocop
run: gem install rubocop code-scanning-rubocop
- name: Rubocop run --no-doc
run: |
bash -c "
rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
[[ $? -ne 2 ]]
"
- name: Upload Sarif output
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: rubocop.sarif

0 comments on commit f0b1336

Please sign in to comment.