Skip to content

Add CI success aggregator job for branch protection #50

Add CI success aggregator job for branch protection

Add CI success aggregator job for branch protection #50

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [master]
jobs:
test:
name: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }} / AA ${{ matrix.activeadmin }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.2', '3.3', '3.4']
rails: ['7.1.0', '7.2.0', '8.0.0']
activeadmin: ['3.2.0', '3.3.0', '3.4.0', '3.5.1']
exclude:
- rails: '8.0.0'
activeadmin: '3.2.0'
env:
RAILS: ${{ matrix.rails }}
AA: ${{ matrix.activeadmin }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rspec spec
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
- name: Run tests with coverage
run: bundle exec rspec spec
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
ci-success:
name: CI success
if: always()
needs: [test, coverage]
runs-on: ubuntu-latest
steps:
- name: Check matrix job results
run: |
if [ "${{ needs.test.result }}" != "success" ] || [ "${{ needs.coverage.result }}" != "success" ]; then
echo "One or more required jobs failed"
exit 1
fi
echo "All required jobs passed"