Skip to content

CI: drop unused coverage, generate matrix dynamically #1

CI: drop unused coverage, generate matrix dynamically

CI: drop unused coverage, generate matrix dynamically #1

Workflow file for this run

---

Check failure on line 1 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

(Line: 30, Col: 7): Unexpected value 'needs'
name: Test
on:
pull_request: {}
push:
branches:
- master
jobs:
rubocop_and_matrix:
runs-on: ubuntu-24.04
outputs:
ruby: ${{ steps.ruby.outputs.versions }}
steps:
- uses: actions/checkout@v4
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
bundler-cache: true
- name: Run Rubocop
run: bundle exec rake rubocop
- id: ruby
uses: voxpupuli/ruby-version@v1
spec:
runs-on: ubuntu-24.04
strategy:
needs: rubocop_and_matrix
fail-fast: false
matrix:
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
name: RSpec - Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v3
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: spec tests
run: bundle exec rake test:spec
- name: Build gem
run: gem build --strict --verbose *.gemspec
# It seems some additonal setup of Docker may be needed for
# the acceptance tests to work.
# - name: Run acceptance tests
# run: bundle exec rake test:acceptance
tests:
if: always()
needs:
- rubocop_and_matrix
- spec
runs-on: ubuntu-24.04
name: Test suite
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}