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

Switch to GitHub Actions #1297

Merged
merged 3 commits into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/acceptance-cluster.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Acceptance cluster

on:
push:
branches:
- master
pull_request:

jobs:
acceptance-cluster:
runs-on: ubuntu-latest
# Items marked as ci_build=yes are allowed to fail
continue-on-error: ${{ matrix.ci_build == 'yes' }}
strategy:
fail-fast: false
matrix:
puppet:
- puppet5
- puppet6
- puppet7
use_agent:
- no
- yes
ci_build:
- no
include:
- puppet: puppet6
use_agent: no
ci_build: yes
env:
BEAKER_debug: true
name: Sensu Go Cluster ${{ matrix.puppet }} (use-agent=${{ matrix.use_agent }} CI=${{ matrix.ci_build }})
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
bundler: '2.1.0'
- name: Decrypt secrets
env:
SENSU_SECRETS_PASSWORD: ${{ secrets.SENSU_SECRETS_PASSWORD }}
if: ${{ env.SENSU_SECRETS_PASSWORD != null }}
run: ./tests/decrypt-secrets.sh
- name: Run tests
run: bundle exec rake beaker
env:
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }}
BEAKER_set: centos-7-cluster
BEAKER_sensu_mode: cluster
BEAKER_sensu_use_agent: ${{ matrix.use_agent }}
BEAKER_sensu_ci_build: ${{ matrix.ci_build }}
74 changes: 74 additions & 0 deletions .github/workflows/acceptance-full.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Acceptance full

on:
push:
branches:
- master
pull_request:

jobs:
acceptance-full:
runs-on: ubuntu-latest
# Items marked as ci_build=yes are allowed to fail
continue-on-error: ${{ matrix.ci_build == 'yes' }}
strategy:
fail-fast: false
matrix:
ghoneycutt marked this conversation as resolved.
Show resolved Hide resolved
# Modes described in DESIGN.md: /~https://github.com/sensu/sensu-puppet/blob/master/DESIGN.md#acceptance-tests
sensu_mode:
- full
- types
- examples
puppet:
- puppet5
- puppet6
- puppet7
use_agent:
- no
ci_build:
- no
include:
- sensu_mode: types
puppet: puppet5
use_agent: yes
ci_build: no
- sensu_mode: types
puppet: puppet6
use_agent: yes
ci_build: no
- sensu_mode: types
puppet: puppet7
use_agent: yes
ci_build: no
- sensu_mode: types
puppet: puppet6
use_agent: no
ci_build: yes
- sensu_mode: examples
puppet: puppet6
use_agent: no
ci_build: yes
env:
BEAKER_debug: true
name: ${{ matrix.set }} ${{ matrix.puppet }} (mode=${{ matrix.sensu_mode }} use-agent=${{ matrix.use_agent }} CI=${{ matrix.ci_build }})
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
bundler: '2.1.0'
- name: Decrypt secrets
env:
SENSU_SECRETS_PASSWORD: ${{ secrets.SENSU_SECRETS_PASSWORD }}
if: ${{ env.SENSU_SECRETS_PASSWORD != null }}
run: ./tests/decrypt-secrets.sh
- name: Run tests
run: bundle exec rake beaker
env:
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }}
BEAKER_set: centos-7
BEAKER_sensu_mode: ${{ matrix.sensu_mode }}
BEAKER_sensu_use_agent: ${{ matrix.use_agent }}
BEAKER_sensu_ci_build: ${{ matrix.ci_build }}
59 changes: 59 additions & 0 deletions .github/workflows/acceptance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Acceptance

on:
push:
branches:
- master
pull_request:

jobs:
acceptance:
runs-on: ubuntu-latest
# Items marked as ci_build=yes are allowed to fail
continue-on-error: ${{ matrix.ci_build == 'yes' }}
strategy:
fail-fast: false
matrix:
set:
- centos-7
- centos-8
- debian-9
- debian-10
- ubuntu-1604
- ubuntu-1804
- amazonlinux-2
- amazonlinux-201803
puppet:
- puppet5
- puppet6
- puppet7
ci_build:
ghoneycutt marked this conversation as resolved.
Show resolved Hide resolved
- no
- yes
exclude:
- puppet: puppet5
ci_build: yes
- puppet: puppet7
ci_build: yes
env:
BEAKER_debug: true
name: ${{ matrix.set }} ${{ matrix.puppet }} (ci=${{ matrix.ci_build }})
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
bundler: '2.1.0'
- name: Decrypt secrets
env:
SENSU_SECRETS_PASSWORD: ${{ secrets.SENSU_SECRETS_PASSWORD }}
if: ${{ env.SENSU_SECRETS_PASSWORD != null }}
run: ./tests/decrypt-secrets.sh
- name: Run tests
run: bundle exec rake beaker
env:
BEAKER_PUPPET_COLLECTION: ${{ matrix.puppet }}
BEAKER_set: ${{ matrix.set }}
BEAKER_sensu_ci_build: ${{ matrix.ci_build }}
28 changes: 28 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
push:
tags:
- '*'

env:
BUNDLE_WITHOUT: system_tests

jobs:
deploy:
name: 'deploy to forge'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true
bundler: '2.1.0'
- name: Build and Deploy
env:
BLACKSMITH_FORGE_USERNAME: sensu
BLACKSMITH_FORGE_API_KEY: '${{ secrets.PUPPET_FORGE_API_KEY }}'
run: bundle exec rake module:push
59 changes: 59 additions & 0 deletions .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Unit

on:
push:
branches:
- master
pull_request:

jobs:
unit:
runs-on: ubuntu-latest
# Items marked as allow_failure=true are allowed to fail
# This is fixtures using latest untagged versions
continue-on-error: ${{ matrix.allow_failure }}
strategy:
fail-fast: false
matrix:
include:
- ruby: 2.4.9
puppet: 5
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.5.7
puppet: 6
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.7.0
puppet: 7
fixtures: .fixtures.yml
allow_failure: false
- ruby: 2.4.9
ghoneycutt marked this conversation as resolved.
Show resolved Hide resolved
puppet: 5
fixtures: .fixtures-latest.yml
allow_failure: true
- ruby: 2.5.7
puppet: 6
fixtures: .fixtures-latest.yml
allow_failure: true
- ruby: 2.7.0
puppet: 7
fixtures: .fixtures-latest.yml
allow_failure: true
env:
BUNDLE_WITHOUT: system_tests:development
PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}.0"
FIXTURES_YML: ${{ matrix.fixtures }}
name: Puppet ${{ matrix.puppet }} (Ruby ${{ matrix.ruby }} fixtures=${{ matrix.fixtures }})
steps:
- uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
bundler: '2.1.0'
- name: Validate
run: bundle exec rake validate lint strings:generate reference
- name: Run tests
run: bundle exec rake parallel_spec
Loading