diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0dbf927..8811acc 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,75 +6,55 @@ on: branches: [master] pull_request: branches: [master] + workflow_dispatch: jobs: - unit-tests: + check: strategy: fail-fast: false matrix: puppet_version: [7] name: Check / Puppet ${{ matrix.puppet_version }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 + container: puppet/pdk:latest steps: + - name: Install build-essential + run: | + export DEBIAN_FRONTEND=noninteractive; + apt-get --yes update + apt-get --yes install build-essential + - name: Checkout source - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Run pdk validate - uses: puppets-epic-show-theatre/action-pdk-validate@v1 - with: - puppet-version: ${{ matrix.puppet_version }} + run: pdk validate --format=text --puppet-version ${{ matrix.puppet_version }} - name: Run pdk test unit - uses: puppets-epic-show-theatre/action-pdk-test-unit@v1 - with: - puppet-version: ${{ matrix.puppet_version }} - - coverage: - strategy: - fail-fast: false - matrix: - puppet_version: [7] - - name: Coverage - runs-on: ubuntu-20.04 - needs: - - unit-tests - - steps: - - name: Checkout source - uses: actions/checkout@v2 - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: "2.7" - bundler-cache: true - - - name: Run test coverage - run: | - bundle exec rake spec:simplecov + run: pdk test unit --format=text --puppet-version ${{ matrix.puppet_version }} acceptance: strategy: fail-fast: false matrix: - os: ['deb10', 'deb11', 'el8', 'rocky8', 'ub2004'] + os: ['rocky8', 'ub2204', 'deb11'] puppet_version: [7] name: Acceptance / ${{ matrix.os }} / Puppet ${{ matrix.puppet_version }} - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 needs: - - unit-tests + - check steps: - name: Enable IPv6 on docker run: | echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json sudo service docker restart + - name: Checkout source - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Ruby uses: ruby/setup-ruby@v1 @@ -90,6 +70,7 @@ jobs: bundle exec rake 'litmus:install_agent[puppet${{ matrix.puppet_version }}]' bundle exec rake litmus:install_module bundle exec rake litmus:acceptance:parallel + - name: Cleanup run: | bundle exec rake 'litmus:tear_down' diff --git a/provision.yaml b/provision.yaml index f2902c6..d4611bd 100644 --- a/provision.yaml +++ b/provision.yaml @@ -1,11 +1,11 @@ --- default: provisioner: docker_exp - images: ['litmusimage/centos:8'] - vars: '{docker_run_opts: ["-p 8091:80"]}' + images: ['waffleimage/centos7'] vagrant: provisioner: vagrant images: ['centos/7', 'generic/ubuntu2004'] + deb_all: provisioner: docker images: ['litmusimage/debian:10', 'litmusimage/debian:11'] @@ -19,6 +19,7 @@ el_all: ub_all: provisioner: docker images: ['litmusimage/ubuntu:20.04', 'litmusimage/ubuntu:22.04'] + gha_deb10: provisioner: docker images: ['litmusimage/debian:10'] @@ -45,7 +46,7 @@ gha_rocky8: # The most reliable workaround for the docker/systemd incompatibility. # see https://github.com/docker/for-linux/issues/835 # see https://github.com/moby/moby/issues/38749 - vars: '{docker_run_opts: ["-v /sys/fs/cgroup:/sys/fs/cgroup:ro"]}' + #vars: '{docker_run_opts: ["-v /sys/fs/cgroup:/sys/fs/cgroup:ro"]}' gha_ub2004: provisioner: docker images: ['litmusimage/ubuntu:20.04']