Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(CAT-1535) Implement Tooling Reusable Workflows #333

Merged
merged 11 commits into from
Dec 14, 2023
98 changes: 0 additions & 98 deletions .dependency_decisions.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Summary
Provide a detailed description of all the changes present in this pull request.

## Additional Context
Add any additional context about the problem here.
- [ ] Root cause and the steps to reproduce. (If applicable)
- [ ] Thought process behind the implementation.

## Related Issues (if any)
Mention any related issues or pull requests.

## Checklist
- [ ] 🟢 Spec tests.
- [ ] 🟢 Acceptance tests.
- [ ] Manually verified.
48 changes: 0 additions & 48 deletions .github/workflows/checks.yaml

This file was deleted.

79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "ci"

on:
pull_request:
branches:
- "main"
workflow_dispatch:

jobs:
linux_tests:
name: Linux, Puppet ${{ matrix.cfg.puppet_version }}, Ruby ${{ matrix.cfg.ruby }}
runs-on: ubuntu-latest
strategy:
matrix:
cfg:
- {puppet_version: '7', ruby: '2.7'}
- {puppet_version: '7', ruby: 'jruby-9.3.7.0'}
- {puppet_version: '8', ruby: '3.2'}
- {puppet_version: '8', ruby: 'jruby-9.4.2.0'}
env:
PUPPET_GEM_VERSION: ~> ${{ matrix.cfg.puppet_version }}
steps:
- name: Checkout current PR
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Ruby version ${{ matrix.cfg.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.cfg.ruby }}
- name: Update rubygems and install gems
run: |
bundle config set without development
bundle install --jobs 4 --retry 3

- name: Rubocop
run: |
bundle exec rake rubocop

- name: Run tests
run: |
bundle exec rake spec

# Starting with version 3.2, Ruby no longer bundles libffi, which is necessary for tests on Windows. Due to a discrepancy between the C
# library the Windows Puppet gem is built against and what GitHub runners use (MinGW and ucrt, respectively) we can't install the
# Windows-specific Puppet gem that includes libffi. To work around these issues, we have a separate "integration" group that we include
# when testing Puppet 8 / Ruby 3.2 on Windows. See PA-5406 for more.
windows_tests:
name: Windows, Puppet ${{ matrix.cfg.puppet_version }}, Ruby ${{ matrix.cfg.ruby }}
runs-on: windows-latest
strategy:
matrix:
cfg:
- {puppet_version: '7', ruby: '2.7'}
- {puppet_version: '8', ruby: '3.2', extra: 'bundle config set with integration'}
env:
PUPPET_GEM_VERSION: ~> ${{ matrix.cfg.puppet_version }}
steps:
- name: Checkout current PR
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Ruby version ${{ matrix.cfg.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.cfg.ruby }}
- name: Update rubygems and install gems
run: |
bundle config set without development
${{ matrix.cfg.extra }}
bundle install --jobs 4 --retry 3

- name: Rubocop
run: |
bundle exec rake rubocop

- name: Run tests
run: |
bundle exec rake spec
27 changes: 27 additions & 0 deletions .github/workflows/labeller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Labeller

on:
issues:
types:
- opened
- labeled
- unlabeled
pull_request_target:
types:
- opened
- labeled
- unlabeled

jobs:
label:
runs-on: ubuntu-latest
steps:

- uses: puppetlabs/[email protected]
name: Label issues or pull requests
with:
label_name: community
label_color: '5319e7'
org_membership: puppetlabs
fail_if_member: 'true'
token: ${{ secrets.IAC_COMMUNITY_LABELER }}
34 changes: 0 additions & 34 deletions .github/workflows/mend.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/mend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "mend"

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

jobs:

mend:
uses: "puppetlabs/cat-github-actions/.github/workflows/tooling_mend_ruby.yml@main"
secrets: "inherit"
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: RSpec tests
name: "nightly"

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read
schedule:
- cron: "0 0 * * *"

jobs:
linux_tests:
Expand Down Expand Up @@ -35,7 +30,14 @@ jobs:
run: |
bundle config set without development
bundle install --jobs 4 --retry 3
- run: bundle exec rake

- name: Rubocop
run: |
bundle exec rake rubocop

- name: Run tests
run: |
bundle exec rake spec

# Starting with version 3.2, Ruby no longer bundles libffi, which is necessary for tests on Windows. Due to a discrepancy between the C
# library the Windows Puppet gem is built against and what GitHub runners use (MinGW and ucrt, respectively) we can't install the
Expand Down Expand Up @@ -65,4 +67,11 @@ jobs:
bundle config set without development
${{ matrix.cfg.extra }}
bundle install --jobs 4 --retry 3
- run: bundle exec rake

- name: Rubocop
run: |
bundle exec rake rubocop

- name: Run tests
run: |
bundle exec rake spec
24 changes: 0 additions & 24 deletions .github/workflows/release.yaml

This file was deleted.

Loading