Sha256: 2e41f85c27b3ca79688e3887736b91bbee093621c7fb6c59fe9fc58d69dd6f49

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

name: CI

on:
  push:
    branches:
      - main
  pull_request:
  schedule:
    - cron: '0 0 * * 0' # weekly

jobs:
  build:
    runs-on: ubuntu-latest
    name: Ruby ${{ matrix.ruby }} AR ${{ matrix.activerecord }}
    timeout-minutes: 10

    env:
      BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/ar_${{ matrix.activerecord }}.gemfile

    strategy:
      fail-fast: false
      matrix:
        ruby: [2.6, 2.7, 3.0]
        activerecord: [60, 61]

    steps:
      - uses: actions/checkout@v2

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

      - name: Rubocop
        run: bundle exec rubocop

      - name: Run tests
        run: bundle exec rake

  publish:
    if: github.event_name == 'push' && github.ref == 'refs/heads/main'
    needs: build
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Release gem
        uses: discourse/publish-rubygems-action@v2
        env:
          RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
          GIT_EMAIL: team@discourse.org
          GIT_NAME: discoursebot

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prometheus_exporter-1.0.1 .github/workflows/ci.yml