Skip to content

Commit 7fffbc1

Browse files
authored
Merge pull request #49 from puppetlabs/maint-update_workflows
(MAINT) Add CI and release workflows
2 parents 024ac47 + afe76fa commit 7fffbc1

File tree

3 files changed

+44
-58
lines changed

3 files changed

+44
-58
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,20 @@
1-
name: CI
1+
name: "ci"
22

33
on:
44
push:
5-
branches: [master]
5+
branches:
6+
- master
67
pull_request:
7-
branches: [master]
8+
branches:
9+
- master
810
schedule:
9-
- cron: "3 0 * * *"
11+
- cron: "0 0 * * *"
12+
workflow_dispatch:
1013

1114
jobs:
12-
lint:
13-
name: RuboCop
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v2
17-
- uses: ruby/setup-ruby@v1
18-
with:
19-
ruby-version: 2.7
20-
bundler-cache: true
21-
- run: bundle exec rake rubocop
15+
ci:
16+
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
17+
with:
18+
with_acceptance: false
19+
secrets: "inherit"
2220

23-
spec:
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
os: ["ubuntu-latest", "windows-latest"]
28-
ruby:
29-
- "2.4"
30-
- "2.5"
31-
- "2.7"
32-
needs: lint
33-
name: RSpec - ${{ matrix.os }} - Ruby ${{ matrix.ruby }}
34-
runs-on: ${{ matrix.os }}
35-
env:
36-
COVERAGE: yes
37-
steps:
38-
- uses: actions/checkout@v2
39-
- uses: ruby/setup-ruby@v1
40-
with:
41-
ruby-version: ${{ matrix.ruby }}
42-
bundler-cache: true
43-
- run: bundle exec rake
44-
45-
release_tests:
46-
strategy:
47-
fail-fast: false
48-
matrix:
49-
os: ["ubuntu-latest", "windows-latest"]
50-
ruby:
51-
- "2.4"
52-
- "2.5"
53-
- "2.7"
54-
needs: lint
55-
name: Release Tests - ${{ matrix.os }} - Ruby ${{ matrix.ruby }}
56-
runs-on: ${{ matrix.os }}
57-
env:
58-
BUNDLE_WITHOUT: development system_tests
59-
CHECK: ci
60-
steps:
61-
- uses: actions/checkout@v2
62-
- uses: ruby/setup-ruby@v1
63-
with:
64-
ruby-version: ${{ matrix.ruby }}
65-
bundler-cache: true
66-
- run: bundle exec rake ci

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "Release"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
target:
7+
description: "The target for the release. This can be a commit sha or a branch."
8+
required: false
9+
default: "main"
10+
11+
jobs:
12+
release:
13+
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release.yml@main"
14+
with:
15+
target: "${{ github.event.inputs.target }}"
16+
secrets: "inherit"

.github/workflows/release_prep.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: "Release Prep"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
target:
7+
description: "The target for the release. This can be a commit sha or a branch."
8+
required: false
9+
default: "main"
10+
11+
jobs:
12+
release_prep:
13+
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release_prep.yml@main"
14+
with:
15+
target: "${{ github.event.inputs.target }}"
16+
secrets: "inherit"

0 commit comments

Comments
 (0)