diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 5c39551..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,92 +0,0 @@ ---- -name: CI - -on: pull_request - -concurrency: - group: ${{ github.head_ref }} - cancel-in-progress: true - -jobs: - setup_matrix: - name: Setup Test Matrix - runs-on: ubuntu-20.04 - timeout-minutes: 40 - outputs: - puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }} - github_action_test_matrix: ${{ steps.get-outputs.outputs.github_action_test_matrix }} - steps: - - uses: actions/checkout@v3 - - - name: Setup ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '2.7.3' - bundler-cache: true - - - name: Run static validations - run: bundle exec rake validate lint - - - name: Run rake rubocop - run: bundle exec rake rubocop - - - name: Setup Test Matrix - id: get-outputs - run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false - - unit: - needs: setup_matrix - runs-on: ubuntu-20.04 - timeout-minutes: 40 - strategy: - fail-fast: false - matrix: - include: ${{fromJson(needs.setup_matrix.outputs.puppet_unit_test_matrix)}} - name: Spec Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }}) - steps: - - uses: actions/checkout@v3 - - - name: Setup ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - - - name: Run tests - run: bundle exec rake parallel_spec - -# TODO: active when acceptance tests have been added -# acceptance: -# name: Litmus Acceptance -# runs-on: ubuntu-20.04 -# env: -# BOLT_GEM: true -# CI: true -# steps: -# - uses: actions/checkout@v3 -# - name: Setup ruby -# uses: ruby/setup-ruby@v1 -# with: -# ruby-version: '2.7.3' -# bundler-cache: true -# -# - name: Provision Testing Environments -# run: | -# bundle exec rake 'litmus:provision_list[default]' -# bundle exec rake 'litmus:install_agent' -# bundle exec rake 'litmus:install_module' -# - name: Run Tests -# run: bundle exec rake 'litmus:acceptance:parallel' -# -# - name: Tear Down -# run: bundle exec rake 'litmus:tear_down' - - tests: - needs: - - unit -# TODO: active when acceptance tests have been added -# - acceptance - runs-on: ubuntu-20.04 - name: Test suite - steps: - - run: echo Test suite completed diff --git a/.github/workflows/run-pdk-tests-on-puppet-7.yml b/.github/workflows/run-pdk-tests-on-puppet-7.yml new file mode 100644 index 0000000..1b13f18 --- /dev/null +++ b/.github/workflows/run-pdk-tests-on-puppet-7.yml @@ -0,0 +1,34 @@ +name: Run PDK tests on Puppet 7.x + +on: + - push + - pull_request + +jobs: + validate-7: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Run pdk validate + uses: puppets-epic-show-theatre/action-pdk-validate@v1 + with: + puppet-version: "7" + # [optional] A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5". + # pe-version: "" + # [optional] A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1". + + test-7: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Run unit tests + uses: puppets-epic-show-theatre/action-pdk-test-unit@v1 + with: + puppet-version: "7" + # [optional] A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5". + # pe-version: "" + # [optional] A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1". diff --git a/.github/workflows/run-pdk-tests-on-puppet-8.yml b/.github/workflows/run-pdk-tests-on-puppet-8.yml new file mode 100644 index 0000000..12460e0 --- /dev/null +++ b/.github/workflows/run-pdk-tests-on-puppet-8.yml @@ -0,0 +1,34 @@ +name: Run PDK tests on Puppet 8.x + +on: + - push + - pull_request + +jobs: + validate-8: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Run pdk validate + uses: puppets-epic-show-theatre/action-pdk-validate@v1 + with: + puppet-version: "8" + # [optional] A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5". + # pe-version: "" + # [optional] A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1". + + test-8: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Run unit tests + uses: puppets-epic-show-theatre/action-pdk-test-unit@v1 + with: + puppet-version: "8" + # [optional] A string indicating the Puppet version to validate against, such as "5.4.2" or "5.5". + # pe-version: "" + # [optional] A string indicating the PE version to validate against, such as "2017.3.5" or "2018.1".