Sha256: c8cc366d1b16397ecc330b0ec16d19576920674f2f7a7590d1612726775d3d51

Contents?: true

Size: 1.91 KB

Versions: 4

Compression:

Stored size: 1.91 KB

Contents

name: Test

on: [push]

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        ruby-version:
          - 2.6
          - 2.7
          - 3.0
        gemfile:
          - gemfiles/Gemfile.rails52
          - gemfiles/Gemfile.rails60

    name: Ruby ${{ matrix.ruby-version }} / Bundle ${{ matrix.gemfile }}

    runs-on: ubuntu-latest

    env:
      BUNDLE_GEMFILE: ${{ matrix.gemfile }}

    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby-version }}
    - name: Install dependencies
      run: bundle install
    - name: Run tests
      run: bundle exec rake

  # A utility job upon which Branch Protection can depend,
  # thus remaining agnostic of the matrix.
  test_matrix:
    if: ${{ always() }}
    runs-on: ubuntu-latest
    name: Matrix
    needs: test
    steps:
    - name: Check build matrix status
      if: ${{ needs.test.result != 'success' }}
      run: exit 1

  notify:
    # Run only on master, but regardless of whether tests past:
    if: ${{ always() && github.ref == 'refs/heads/master' }}

    needs: test_matrix

    runs-on: ubuntu-latest

    steps:
    - uses: 8398a7/action-slack@v3
      with:
        status: custom
        fields: workflow,commit,author
        custom_payload: |
          {
            channel: 'C7FQWGDHP',
            username: 'CI – ' + '${{ github.repository }}'.split('/')[1],
            icon_emoji: ':hammer_and_wrench:',
            attachments: [{
              color: '${{ needs.test_matrix.result }}' === 'success' ? 'good' : '${{ needs.test_matrix.result }}' === 'failure' ? 'danger' : 'warning',
              text: `${process.env.AS_WORKFLOW} against \`${{ github.ref }}\` (${process.env.AS_COMMIT}) for ${{ github.actor }} resulted in *${{ needs.test_matrix.result }}*.`
            }]
          }
      env:
        SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ndr_import-10.1.1 .github/workflows/test.yml
ndr_import-10.1 .github/workflows/test.yml
ndr_import-10.0 .github/workflows/test.yml
ndr_import-9.1.0 .github/workflows/test.yml