Sha256: ab8d3f42e703d4457a5304f46ded3b617181a6004ba82128af8a9304f9c0b750

Contents?: true

Size: 1.59 KB

Versions: 58

Compression:

Stored size: 1.59 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
    services:
      postgres:
        image: postgres:11.5
        ports: ["5432:5432"]
        options:
          --health-cmd pg_isready --health-interval 10s --health-timeout 5s
          --health-retries 5

    steps:
      - uses: actions/checkout@v3

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

      - name: Install PostgreSQL 11 client
        run: |
          sudo apt -y install libpq-dev

      - 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:
          PGHOST: localhost
          PGUSER: postgres
          BUNDLE_GEMFILE: ${{ matrix.gemfile }}
        run: |
          psql -U postgres -c "create database test"
          bundle exec rake

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
email_data-1694910495.0.0 .github/workflows/ruby-tests.yml
email_data-1694305650.0.0 .github/workflows/ruby-tests.yml
email_data-1693700838.0.0 .github/workflows/ruby-tests.yml
email_data-1693096010.0.0 .github/workflows/ruby-tests.yml
email_data-1692491201.0.0 .github/workflows/ruby-tests.yml
email_data-1691886470.0.0 .github/workflows/ruby-tests.yml
email_data-1691281706.0.0 .github/workflows/ruby-tests.yml
email_data-1690676894.0.0 .github/workflows/ruby-tests.yml
email_data-1690072122.0.0 .github/workflows/ruby-tests.yml
email_data-1689467392.0.0 .github/workflows/ruby-tests.yml
email_data-1688862479.0.0 .github/workflows/ruby-tests.yml
email_data-1688257664.0.0 .github/workflows/ruby-tests.yml
email_data-1687652927.0.0 .github/workflows/ruby-tests.yml
email_data-1687048036.0.0 .github/workflows/ruby-tests.yml
email_data-1686443234.0.0 .github/workflows/ruby-tests.yml
email_data-1685838438.0.0 .github/workflows/ruby-tests.yml
email_data-1685233635.0.0 .github/workflows/ruby-tests.yml
email_data-1684628879.0.0 .github/workflows/ruby-tests.yml
email_data-1684024035.0.0 .github/workflows/ruby-tests.yml
email_data-1683419196.0.0 .github/workflows/ruby-tests.yml