Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
fixtures:
repositories:
stdlib:
repo: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
ref: 'v8.1.0'
stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git
facts: https://github.com/puppetlabs/puppetlabs-facts.git
provision: https://github.com/puppetlabs/provision.git
puppet_agent: https://github.com/puppetlabs/puppetlabs-puppet_agent.git
Expand Down
95 changes: 12 additions & 83 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,90 +1,19 @@
---
name: CI
name: "CI"

on: pull_request
on:
pull_request:

concurrency:
group: ${{ github.head_ref }}
group: ${{ github.workflow }}-${{ github.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

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
- acceptance
runs-on: ubuntu-20.04
name: Test suite
steps:
- run: echo Test suite completed
Spec:
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
secrets: "inherit"

Acceptance:
needs: Spec
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
secrets: "inherit"
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/spec/fixtures/modules/*
/tmp/
/vendor/
/.vendor/
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
.resource_types
.modules
.task_cache.json
.plan_cache.json
.rerun.json
bolt-debug.log
15 changes: 10 additions & 5 deletions .pdkignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,34 @@
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/spec/fixtures/modules/*
/tmp/
/vendor/
/.vendor/
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/appveyor.yml
/.editorconfig
.resource_types
.modules
.task_cache.json
.plan_cache.json
.rerun.json
bolt-debug.log
/.fixtures.yml
/Gemfile
/.gitattributes
/.github/
/.gitignore
/.gitlab-ci.yml
/.pdkignore
/.puppet-lint.rc
/Rakefile
/rakelib/
/.rspec
/.rubocop.yml
/..yml
/.yardopts
/spec/
/.vscode/
Expand Down
Loading
Loading