Skip to content

github workflow updates #31

github workflow updates

github workflow updates #31

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
test_and_lint:
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
- 3.1
- 3.2
- 3.3
env:
BUNDLE_GEMFILE: Gemfile
name: "RSpec tests: Ruby ${{ matrix.ruby }}"
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby }}
- name: Run tests and linter
run: bundle exec rake
notify_on_failure:
runs-on: ubuntu-latest
needs: [test_and_lint]
if: ${{ failure() && github.ref == 'refs/heads/main' }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
steps:
- uses: slackapi/[email protected]
with:
payload: |
{
"text": "${{ github.repository }}/${{ github.ref }}: FAILED\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}