Skip to content

Commit

Permalink
Merge pull request #310 from puppetlabs/maint-add_ci_workflow
Browse files Browse the repository at this point in the history
(MAINT) Add CI workflow
  • Loading branch information
pmcmaw authored Sep 29, 2022
2 parents 13f2953 + f68b2be commit e7e4444
Show file tree
Hide file tree
Showing 93 changed files with 1,929 additions and 1,853 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: "ci"

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
pull_request:
branches:
- "main"

jobs:
spec:
name: "spec"
runs-on: "ubuntu-latest"

steps:

- name: "checkout"
uses: "actions/checkout@v3"

- name: "setup ruby"
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
bundler-cache: true

- name: "bundle environment"
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: "rubocop"
run : |
bundle exec rubocop
- name: "spec"
run: |
bundle exec rake spec
acceptance:
name: "acceptance"
runs-on: "ubuntu-latest"
needs: "spec"
strategy:
matrix:
puppet: ["puppet6", "puppet7"]

steps:

- name: "checkout"
uses: "actions/checkout@v3"

- name: "setup ruby"
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
bundler-cache: true

- name: "bundle environment"
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: "provision"
run: |
bundle exec rake 'litmus:provision[docker, ubuntu]'
- name: "install agent"
run: |
bundle exec rake 'litmus:install_agent[${{ matrix.puppet }}]'
- name: "install module"
run: |
bundle exec rake 'litmus:install_modules_from_directory[./spec/fixtures/acceptance/modules]'
bundle exec rake litmus:install_gems
- name: "execute tests"
run: |
bundle exec rake litmus:acceptance:parallel
Loading

0 comments on commit e7e4444

Please sign in to comment.