Skip to content

Merge pull request #67 from voxpupuli/kenyon-patch-2 #104

Merge pull request #67 from voxpupuli/kenyon-patch-2

Merge pull request #67 from voxpupuli/kenyon-patch-2 #104

Workflow file for this run

name: CI
on:
pull_request: {}
push:
branches:
- master
env:
BUNDLE_WITHOUT: release
jobs:
pre:
runs-on: ubuntu-latest
outputs:
examples: ${{ steps.list_examples.outputs.examples }}
name: Pre
steps:
- uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: List examples
id: list_examples
run: .github/script/examples
unit:
needs: pre
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- '3.2'
- '3.1'
- '3.0'
- '2.7'
name: Unit / Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake spec
- name: Build gem
run: gem build --strict --verbose *.gemspec
acceptance:
needs:
- pre
- unit
runs-on: ubuntu-latest
env:
BEAKER_setfile: debian10-64
strategy:
fail-fast: false
matrix:
ruby:
- '3.2'
- '3.1'
- '3.0'
- '2.7'
example: ${{ fromJson(needs.pre.outputs.examples) }}
name: Acceptance / Ruby ${{ matrix.ruby }} - ${{ matrix.example }}
steps:
- uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
working-directory: examples/${{ matrix.example }}
- name: Run tests
run: bundle exec rake beaker
working-directory: examples/${{ matrix.example }}
post:
needs:
- unit
- acceptance
runs-on: ubuntu-latest
name: All tests
steps:
- name: Completion
run: echo "All tests completed successfully"