Skip to content

Commit

Permalink
(MAINT) Add CI and release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
chelnak committed Oct 3, 2022
1 parent 4763ac4 commit d1ea594
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 58 deletions.
70 changes: 12 additions & 58 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,20 @@
name: CI
name: "ci"

on:
push:
branches: [master]
branches:
- master
pull_request:
branches: [master]
branches:
- master
schedule:
- cron: "3 0 * * *"
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
lint:
name: RuboCop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- run: bundle exec rake rubocop
release:
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_ci.yml@main"
with:
with_acceptance: "false"
secrets: "inherit"

spec:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"]
ruby:
- "2.4"
- "2.5"
- "2.7"
needs: lint
name: RSpec - ${{ matrix.os }} - Ruby ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
env:
COVERAGE: yes
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake

release_tests:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "windows-latest"]
ruby:
- "2.4"
- "2.5"
- "2.7"
needs: lint
name: Release Tests - ${{ matrix.os }} - Ruby ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
env:
BUNDLE_WITHOUT: development system_tests
CHECK: ci
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake ci
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Release"

on:
workflow_dispatch:
inputs:
target:
description: "The target for the release. This can be a commit sha or a branch."
required: false
default: "main"

jobs:
release:
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release.yml@main"
with:
target: "${{ github.event.inputs.target }}"
secrets: "inherit"
16 changes: 16 additions & 0 deletions .github/workflows/release_prep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Release Prep"

on:
workflow_dispatch:
inputs:
target:
description: "The target for the release. This can be a commit sha or a branch."
required: false
default: "main"

jobs:
release_prep:
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_release_prep.yml@main"
with:
target: "${{ github.event.inputs.target }}"
secrets: "inherit"

0 comments on commit d1ea594

Please sign in to comment.