Sha256: d4e942cece3261eb555f410b2c45b0b98abe04b7a77dabd59484040ecdbd15e8

Contents?: true

Size: 1.66 KB

Versions: 1

Compression:

Stored size: 1.66 KB

Contents

name: Main
on:
  pull_request:
    branches:
    - main
  push:
    branches:
    - main
jobs:
  ci:
    name: CI
    strategy:
      fail-fast: false
      matrix:
        # Due to https://github.com/actions/runner/issues/849, we have to use
        # quotes for '3.0' -- without quotes, CI sees '3' and runs the latest.
        ruby: [2.4, 2.5, 2.6, 2.7, '3.0', 3.1, jruby, truffleruby-head]
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3

    # Conditionally configure bundler via environment variables as advised
    #   * https://github.com/ruby/setup-ruby#bundle-config
    - name: Set bundler environment variables
      run: |
        echo "BUNDLE_WITHOUT=checks:docs" >> $GITHUB_ENV
      if: matrix.ruby != 3.1

    # Use 'bundler-cache: true' instead of actions/cache as advised:
    #   * https://github.com/actions/cache/blob/main/examples.md#ruby---bundler
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
        bundler-cache: true

    - run: bundle exec rspec

    - uses: codecov/codecov-action@v2
      with:
        files: ./coverage/coverage.xml
        fail_ci_if_error: true # optional (default = false)
        verbose: true # optional (default = false)
      if: matrix.ruby == 3.1

    - run: bundle exec rubocop
      if: matrix.ruby == 3.1

    - run: |
        bundle exec yard doctest
        bundle exec dokaz
      if: matrix.ruby == 3.1

    - name: Run benchmarks on Ruby 2.7 or 3.1
      run: |
        BUNDLE_GEMFILE=benchmarks/Gemfile bundle install --jobs 4 --retry 3
        BUNDLE_GEMFILE=benchmarks/Gemfile bundle exec ruby benchmarks/benchmarks.rb
      if: matrix.ruby == '2.7' || matrix.ruby == '3.1'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
memo_wise-1.7.0 .github/workflows/main.yml