Skip to content

Commit 69cb6b3

Browse files
authored
Merge pull request #333 from puppetlabs/CAT-1535/main/update_workflows
(CAT-1535) Implement Tooling Reusable Workflows
2 parents 8f2f02d + 3846ac0 commit 69cb6b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+596
-465
lines changed

.dependency_decisions.yml

Lines changed: 0 additions & 98 deletions
This file was deleted.

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Summary
2+
Provide a detailed description of all the changes present in this pull request.
3+
4+
## Additional Context
5+
Add any additional context about the problem here.
6+
- [ ] Root cause and the steps to reproduce. (If applicable)
7+
- [ ] Thought process behind the implementation.
8+
9+
## Related Issues (if any)
10+
Mention any related issues or pull requests.
11+
12+
## Checklist
13+
- [ ] 🟢 Spec tests.
14+
- [ ] 🟢 Acceptance tests.
15+
- [ ] Manually verified.

.github/workflows/checks.yaml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: "ci"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
workflow_dispatch:
8+
9+
jobs:
10+
linux_tests:
11+
name: Linux, Puppet ${{ matrix.cfg.puppet_version }}, Ruby ${{ matrix.cfg.ruby }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
cfg:
16+
- {puppet_version: '7', ruby: '2.7'}
17+
- {puppet_version: '7', ruby: 'jruby-9.3.7.0'}
18+
- {puppet_version: '8', ruby: '3.2'}
19+
- {puppet_version: '8', ruby: 'jruby-9.4.2.0'}
20+
env:
21+
PUPPET_GEM_VERSION: ~> ${{ matrix.cfg.puppet_version }}
22+
steps:
23+
- name: Checkout current PR
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
- name: Install Ruby version ${{ matrix.cfg.ruby }}
28+
uses: ruby/setup-ruby@v1
29+
with:
30+
ruby-version: ${{ matrix.cfg.ruby }}
31+
- name: Update rubygems and install gems
32+
run: |
33+
bundle config set without development
34+
bundle install --jobs 4 --retry 3
35+
36+
- name: Rubocop
37+
run: |
38+
bundle exec rake rubocop
39+
40+
- name: Run tests
41+
run: |
42+
bundle exec rake spec
43+
44+
# Starting with version 3.2, Ruby no longer bundles libffi, which is necessary for tests on Windows. Due to a discrepancy between the C
45+
# library the Windows Puppet gem is built against and what GitHub runners use (MinGW and ucrt, respectively) we can't install the
46+
# Windows-specific Puppet gem that includes libffi. To work around these issues, we have a separate "integration" group that we include
47+
# when testing Puppet 8 / Ruby 3.2 on Windows. See PA-5406 for more.
48+
windows_tests:
49+
name: Windows, Puppet ${{ matrix.cfg.puppet_version }}, Ruby ${{ matrix.cfg.ruby }}
50+
runs-on: windows-latest
51+
strategy:
52+
matrix:
53+
cfg:
54+
- {puppet_version: '7', ruby: '2.7'}
55+
- {puppet_version: '8', ruby: '3.2', extra: 'bundle config set with integration'}
56+
env:
57+
PUPPET_GEM_VERSION: ~> ${{ matrix.cfg.puppet_version }}
58+
steps:
59+
- name: Checkout current PR
60+
uses: actions/checkout@v4
61+
with:
62+
fetch-depth: 0
63+
- name: Install Ruby version ${{ matrix.cfg.ruby }}
64+
uses: ruby/setup-ruby@v1
65+
with:
66+
ruby-version: ${{ matrix.cfg.ruby }}
67+
- name: Update rubygems and install gems
68+
run: |
69+
bundle config set without development
70+
${{ matrix.cfg.extra }}
71+
bundle install --jobs 4 --retry 3
72+
73+
- name: Rubocop
74+
run: |
75+
bundle exec rake rubocop
76+
77+
- name: Run tests
78+
run: |
79+
bundle exec rake spec

.github/workflows/labeller.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Labeller
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
- labeled
8+
- unlabeled
9+
pull_request_target:
10+
types:
11+
- opened
12+
- labeled
13+
- unlabeled
14+
15+
jobs:
16+
label:
17+
runs-on: ubuntu-latest
18+
steps:
19+
20+
- uses: puppetlabs/[email protected]
21+
name: Label issues or pull requests
22+
with:
23+
label_name: community
24+
label_color: '5319e7'
25+
org_membership: puppetlabs
26+
fail_if_member: 'true'
27+
token: ${{ secrets.IAC_COMMUNITY_LABELER }}

.github/workflows/mend.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/mend.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: "mend"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
schedule:
8+
- cron: "0 0 * * *"
9+
workflow_dispatch:
10+
11+
jobs:
12+
13+
mend:
14+
uses: "puppetlabs/cat-github-actions/.github/workflows/tooling_mend_ruby.yml@main"
15+
secrets: "inherit"

.github/workflows/rspec_tests.yaml renamed to .github/workflows/nightly.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
name: RSpec tests
1+
name: "nightly"
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
8-
9-
permissions:
10-
contents: read
4+
schedule:
5+
- cron: "0 0 * * *"
116

127
jobs:
138
linux_tests:
@@ -35,7 +30,14 @@ jobs:
3530
run: |
3631
bundle config set without development
3732
bundle install --jobs 4 --retry 3
38-
- run: bundle exec rake
33+
34+
- name: Rubocop
35+
run: |
36+
bundle exec rake rubocop
37+
38+
- name: Run tests
39+
run: |
40+
bundle exec rake spec
3941
4042
# Starting with version 3.2, Ruby no longer bundles libffi, which is necessary for tests on Windows. Due to a discrepancy between the C
4143
# library the Windows Puppet gem is built against and what GitHub runners use (MinGW and ucrt, respectively) we can't install the
@@ -65,4 +67,11 @@ jobs:
6567
bundle config set without development
6668
${{ matrix.cfg.extra }}
6769
bundle install --jobs 4 --retry 3
68-
- run: bundle exec rake
70+
71+
- name: Rubocop
72+
run: |
73+
bundle exec rake rubocop
74+
75+
- name: Run tests
76+
run: |
77+
bundle exec rake spec

.github/workflows/release.yaml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)