jwt/ruby-jwt

View on GitHub
.github/workflows/test.yml

Summary

Maintainability
Test Coverage
---
name: test
on:
  push:
    branches:
      - "*"
  pull_request:
    branches:
      - "*"
jobs:
  lint:
    name: RuboCop
    timeout-minutes: 30
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: "2.4"
        bundler-cache: true
    - name: Run RuboCop
      run: bundle exec rubocop
  test:
    strategy:
      fail-fast: false
      matrix:
        ruby:
          - 2.3
          - 2.4
          - 2.5
          - 2.6
          - 2.7
          - "3.0"
        gemfile:
          - gemfiles/standalone.gemfile
          - gemfiles/openssl.gemfile
          - gemfiles/rbnacl.gemfile
        experimental: [false]
        include:
          - ruby: 2.1
            gemfile: 'gemfiles/rbnacl.gemfile'
            experimental: false
          - ruby: 2.2
            gemfile: 'gemfiles/rbnacl.gemfile'
            experimental: false
          - ruby: 2.7
            coverage: "true"
            gemfile: 'gemfiles/rbnacl.gemfile'
          - ruby: "ruby-head"
            experimental: true
          - ruby: "truffleruby-head"
            experimental: true
    runs-on: ubuntu-20.04
    continue-on-error: ${{ matrix.experimental }}
    env:
      BUNDLE_GEMFILE: ${{ matrix.gemfile }}

    steps:
    - uses: actions/checkout@v2

    - name: Install libsodium
      run: |
        sudo apt-get update -q
        sudo apt-get install libsodium-dev -y

    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
        bundler-cache: true

    - name: Run tests
      run: bundle exec rspec