Skip to content

Merge pull request #132 from bastelfreak/rel220 #323

Merge pull request #132 from bastelfreak/rel220

Merge pull request #132 from bastelfreak/rel220 #323

Workflow file for this run

name: Test
on:
pull_request: {}
push:
branches:
- master
env:
BUNDLE_WITHOUT: release
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Run Rubocop
run: bundle exec rake rubocop
rspec:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby: "2.7"
- ruby: "3.0"
coverage: "yes"
- ruby: "3.1"
- ruby: "3.2"
env:
COVERAGE: ${{ matrix.coverage }}
name: RSpec - Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v4
- 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
docker:
runs-on: ubuntu-latest
name: Docker
steps:
- uses: actions/checkout@v4
- name: Install Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Run acceptance tests
run: bundle exec rake test:acceptance
beaker_in_container:
runs-on: ubuntu-latest
name: Docker - Beaker in container connection test
steps:
- uses: actions/checkout@v4
# use this and not container key from gha to not have a docker network from github
- name: Run Beaker in docker container
uses: addnab/docker-run-action@v3
with:
image: puppet/puppet-dev-tools:2023-02-24-1bca42e
options: -v ${{ github.workspace }}:/work
run: |
cd /work
ls -la
bundle install
export DOCKER_IN_DOCKER=true
bundle exec rake test:acceptance
podman:
runs-on: ubuntu-latest
name: Podman
steps:
- uses: actions/checkout@v4
- name: Install Ruby 3.2
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Run acceptance tests
run: bundle exec rake test:acceptance
tests:
needs:
- docker
- beaker_in_container
- podman
- rubocop
- rspec
runs-on: ubuntu-latest
name: Test suite
steps:
- run: echo Test suite completed