Skip to content

Commit

Permalink
Merge pull request #1192 from puppetlabs/CONT-380-update_ci
Browse files Browse the repository at this point in the history
(CONT-380) Refresh CI
  • Loading branch information
GSPatton committed Dec 15, 2022
2 parents 2ac1d47 + f6ee6dc commit 15583ca
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 93 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: "Acceptance Tests"
name: "acceptance"

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

env:
BOLT_GEM: true
Expand All @@ -11,7 +15,7 @@ env:
jobs:
Acceptance:
name: 'Acceptance Tests (Ruby ${{ matrix.ruby_version }})'
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand All @@ -29,7 +33,7 @@ jobs:
with:
ruby-version: "2.7"
bundler-cache: true

- name: Provision Test Environment
run: |
echo "Provisioning using ${{ matrix.provider }}: ${{ matrix.image }}"
Expand All @@ -43,8 +47,8 @@ jobs:
bundle exec bolt command run "cd pdk && git fetch origin pull/${{ github.event.number }}/head:pdk_test_repo" --targets ssh_nodes --inventory spec/fixtures/litmus_inventory.yaml
echo "Checking out to ${{ github.event.number }}"
bundle exec bolt command run "cd pdk && git checkout pdk_test_repo" --targets ssh_nodes --inventory spec/fixtures/litmus_inventory.yaml
echo "Running bundle install in container"
echo "Running bundle install in container"
- name: Bundle Install (Test Target)
run: |
echo "Running bundle install in container"
Expand All @@ -53,7 +57,7 @@ jobs:
- name: Exec Acceptance Tests
run: |
bundle exec bolt command run 'cd pdk && CI=true bundle exec rake acceptance:local_parallel' --targets ssh_nodes --inventory spec/fixtures/litmus_inventory.yaml
- name: Tear Down
if: ${{ always() }}
run: |
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "ci"

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

jobs:
spec:
name: "spec"
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
ruby_version: ['2.5', '2.7']

steps:

- name: "checkout"
uses: "actions/checkout@v3"

- name: "setup ruby"
uses: "ruby/setup-ruby@v1"
with:
ruby-version: ${{ matrix.ruby_version }}
bundler-cache: true
env:
BUNDLE_WITH: "test"

- name: "bundle environment"
run: |
echo ::group::bundler environment
bundle env
echo ::endgroup::
- name: "license check"
run: bundle exec rake license_finder

- name: "rubocop"
run: |
bundle exec rubocop
- name: "spec"
run: |
bundle exec rake spec
63 changes: 0 additions & 63 deletions .github/workflows/spec.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/stale.yml

This file was deleted.

4 changes: 1 addition & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in pdk.gemspec
gemspec

gem 'nokogiri', '~> 1.10.8'

group :development do
gem 'activesupport', '4.2.9'
gem 'github_changelog_generator', '~> 1.14'
Expand All @@ -22,14 +20,14 @@ group :test do
gem 'parser', '~> 2.7.1'
gem 'rake', '~> 12.3', '>= 12.3.3'
gem 'rspec', '~> 3.0'
gem 'rspec-xsd'
gem 'rubocop', '~> 0.57.2'
gem 'rubocop-rspec', '~> 1.27.0'
gem 'simplecov-console'
end

group :acceptance do
gem 'minitar-cli'
gem 'rspec-xsd'
gem 'serverspec'
end

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# pdk [![Build Status](https://travis-ci.org/puppetlabs/pdk.svg?branch=main)](https://travis-ci.org/puppetlabs/pdk) [![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/x70e2fqllbaootpd?svg=true)](https://ci.appveyor.com/project/puppetlabs/pdk) [![Coverage Status](https://coveralls.io/repos/github/puppetlabs/pdk/badge.svg?branch=main)](https://coveralls.io/github/puppetlabs/pdk?branch=main)
# pdk

[![ci](https://github.com/puppetlabs/pdk/actions/workflows/ci.yml/badge.svg)](https://github.com/puppetlabs/pdk/actions/workflows/ci.yml) [![Gem Version](https://badge.fury.io/rb/pdk.svg)](https://badge.fury.io/rb/pdk)

* [Installation](#installation)
* [Basic usage](#basic-usage)
Expand Down

0 comments on commit 15583ca

Please sign in to comment.