Sha256: ddff33a6e33e5cc32fd87d8df1bba86c05a3b3a4b8e1553688b2896f8b2a18fd

Contents?: true

Size: 1.31 KB

Versions: 2

Compression:

Stored size: 1.31 KB

Contents

---
name: ruby-tests

on:
  pull_request_target:
  push:
    branches:
      - main
  workflow_dispatch:
    inputs: {}

jobs:
  build:
    name: Tests with Ruby ${{ matrix.ruby }} and ${{ matrix.gemfile }}
    runs-on: "ubuntu-latest"
    if: |
      github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target' ||
      github.actor != 'dependabot[bot]'
    strategy:
      fail-fast: false
      matrix:
        ruby: ["2.7", "3.0", "3.1"]
        gemfile:
          - Gemfile

    steps:
      - uses: actions/checkout@v3

      - uses: actions/cache@v3
        with:
          path: vendor/bundle
          key: >
            ${{ runner.os }}-${{ matrix.ruby }}-gems-${{
            hashFiles(matrix.gemfile) }}
          restore-keys: >
            ${{ runner.os }}-${{ matrix.ruby }}-gems-${{
            hashFiles(matrix.gemfile) }}

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

      - name: Install gem dependencies
        env:
          BUNDLE_GEMFILE: ${{ matrix.gemfile }}
        run: |
          gem install bundler
          bundle config path vendor/bundle
          bundle update --jobs 4 --retry 3

      - name: Run Tests
        env:
          BUNDLE_GEMFILE: ${{ matrix.gemfile }}
        run: |
          bundle exec rake

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
superconfig-2.1.1 .github/workflows/ruby-tests.yml
superconfig-2.0.1 .github/workflows/ruby-tests.yml