Skip to content
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
Empty file removed .cane
Empty file.
7 changes: 0 additions & 7 deletions .github/dependabot.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: "Test"

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

# The default token is granted write access to most of the repository.
# Nothing here needs more than the checkout.
permissions:
contents: read

# Supersede in-flight runs for a branch. Pull requests cancel freely, but
# pushes to main do not: every commit on main should keep a build of its own.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint-unit:
# Pinned to a commit rather than @main so an upstream edit cannot reach
# this repository's CI without a reviewed pull request. The trailing
# comment names the release the commit belongs to, which is what lets
# Renovate track the pin by version and keep both in step.
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@95ef7803cf23aae5ee68593de5b7e0a731c1a929 # v0.4.0
with:
# This gem requires Ruby 3.2, and so do busser 0.9 and cucumber 11.
# Without this the shared workflow would still start a Ruby 3.1 job and
# bundler would refuse to resolve there.
ruby_versions: '["3.2", "3.3", "3.4", "4.0"]'
28 changes: 28 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: "PR Title"

"on":
pull_request_target:
types: [opened, edited, reopened, synchronize]

permissions:
contents: read

jobs:
conventional-title:
name: "Conventional commit title"
runs-on: ubuntu-latest
permissions:
pull-requests: read
steps:
# Pull requests here are squash merged, so the pull request title becomes
# the commit subject on main. That makes the title the one place worth
# checking: release-please reads those subjects to decide the next
# version and to build the changelog.
#
# pull_request_target is used so the check also runs for pull requests
# from forks. No repository code is checked out in this job, so none of
# the usual pull_request_target risk applies.
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 45 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: "Release"

"on":
push:
branches: [main]

permissions:
contents: read

jobs:
release-please:
runs-on: ubuntu-latest
permissions:
contents: write # tag the release and commit the version bump
pull-requests: write # open and update the release pull request
packages: write # push the gem to GitHub Packages
steps:
# Opens and maintains a release pull request. Merging that pull request
# is what actually cuts a release, so every step below is skipped until
# release_created is set.
- uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
id: release
with:
token: ${{ secrets.PORTER_GITHUB_TOKEN }}

- name: Checkout code
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

# These two steps are handed publishing credentials, so they are pinned
# to a commit rather than a branch. A floating ref would let whoever
# controls that branch run code with a token that can push this gem.
- name: Publish to GitHub Packages
if: ${{ steps.release.outputs.release_created }}
uses: actionshub/publish-gem-to-github@86eb0ce1ced1072298bf68776a32a5c9703ad9aa # v1.0.13
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}

- name: Publish to RubyGems
if: ${{ steps.release.outputs.release_created }}
uses: actionshub/publish-gem-to-rubygems@f9126f7a2d36a4fd31a13e78fde5fbdcc4b7b251 # v2.0.6
with:
token: ${{ secrets.RUBYGEMS_API_KEY }}
6 changes: 6 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
default: true
MD004: false
MD012: false
MD013: false
MD024: false
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.4"
}
10 changes: 10 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
---
require:
- cookstyle/chefstyle

AllCops:
TargetRubyVersion: 3.1
Exclude:
- "vendor/**/*"
- "spec/**/*"

Style/ClassAndModuleChildren:
Exclude:
- lib/busser/runner_plugin/bash.rb
14 changes: 7 additions & 7 deletions .simplecov
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
SimpleCov.profiles.define 'gem' do
command_name 'Specs'
SimpleCov.profiles.define "gem" do
command_name "Specs"

add_filter '.gem/'
add_filter '/spec/'
add_filter '/lib/vendor/'
add_filter ".gem/"
add_filter "/spec/"
add_filter "/lib/vendor/"

add_group 'Libraries', '/lib/'
add_group "Libraries", "/lib/"
end
SimpleCov.start 'gem'
SimpleCov.start "gem"
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
extends: default
rules:
line-length:
max: 256
level: warning
18 changes: 13 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# -*- encoding: utf-8 -*-
source "https://rubygems.org"

gemspec

group :guard do
gem "guard-cucumber"
gem "guard-cane"
gem "guard-rubocop"
group :cookstyle do
gem "cookstyle", ">= 9.0.0"
end

group :test do
gem "aruba", ">= 2.0"
gem "base64" # cucumber needs it; not a default gem on Ruby 4.0
gem "cucumber", ">= 11.1"
gem "rake"
end

group :development do
gem "simplecov"
end
26 changes: 0 additions & 26 deletions Guardfile

This file was deleted.

20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# <a name="title"></a> Busser::RunnerPlugin::Bash
# Busser::RunnerPlugin::Bash

[![Gem Version](https://badge.fury.io/rb/busser-bash.png)](http://badge.fury.io/rb/busser-bash)
[![Build Status](https://travis-ci.org/test-kitchen/busser-bash.png?branch=master)](https://travis-ci.org/test-kitchen/busser-bash)
[![Code Climate](https://codeclimate.com/github/test-kitchen/busser-bash.png)](https://codeclimate.com/github/test-kitchen/busser-bash)
[![Gem Version](https://badge.fury.io/rb/busser-bash.svg)](http://badge.fury.io/rb/busser-bash)

A Busser runner plugin for testing bash scripts

## Status

This software project is no longer under active development as it has no active maintainers. The software may continue to work for some or all use cases, but issues filed in GitHub will most likely not be triaged. If a new maintainer is interested in working on this project please come chat with us in #test-kitchen on Chef Community Slack.

## <a name="installation"></a> Installation and Setup
## Installation and Setup

Please read the Busser [plugin usage][plugin_usage] page for more details.

## <a name="usage"></a> Usage
## Usage

Please put test files into [COOKBOOK]/test/integration/[SUITES]/bash/

Expand All @@ -28,11 +26,11 @@ Please put test files into [COOKBOOK]/test/integration/[SUITES]/bash/

The exit code of the script is used as indicator for failure or success.

### <a name="note"></a> Note
### Note

Globbing pattern to match files is `"bash/*_{test,spec}.{sh,bash}"`.

## <a name="development"></a> Development
## Development

* Source hosted at [GitHub][repo]
* Report issues/questions/feature requests on [GitHub Issues][issues]
Expand All @@ -47,11 +45,11 @@ example:
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## <a name="authors"></a> Authors
## Authors

Created and maintained by [Fletcher Nichol][author] (<fnichol@nichol.ca>)

## <a name="license"></a> License
## License

Apache 2.0 (see [LICENSE][license])

Expand All @@ -60,4 +58,4 @@ Apache 2.0 (see [LICENSE][license])
[issues]: https://github.com/fnichol/busser-bash/issues
[license]: https://github.com/fnichol/busser-bash/blob/master/LICENSE
[repo]: https://github.com/fnichol/busser-bash
[plugin_usage]: http://docs.kitchen-ci.org/busser/plugin-usage
[plugin_usage]: https://kitchen.ci/docs/verifiers/
29 changes: 2 additions & 27 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# -*- encoding: utf-8 -*-

require "bundler/gem_tasks"

require "cucumber/rake/task"
Expand All @@ -8,29 +6,6 @@ Cucumber::Rake::Task.new(:features) do |t|
end

desc "Run all test suites"
task :test => [:features]

require "finstyle"
require "rubocop/rake_task"
RuboCop::RakeTask.new(:style) do |task|
task.options << "--display-cop-names"
end

require "cane/rake_task"
desc "Run cane to check quality metrics"
Cane::RakeTask.new do |cane|
cane.canefile = "./.cane"
end

desc "Display LOC stats"
task :stats do
puts "\n## Production Code Stats"
sh "countloc -r lib"
puts "\n## Test Code Stats"
sh "countloc -r features"
end

desc "Run all quality tasks"
task :quality => [:cane, :style, :stats]
task test: [:features]

task :default => [:test, :quality]
task default: [:test]
Loading
Loading