-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add publish workflow, lint workflow (#24)
* feat: Add publish workflow, lint workflow - Adds linting and unit test workflows - Adds publish step to Rubygems and GitHub Package registry - Adds markdownlint config - Comment out failing cucumber tests if anyone can help configure cucumber to ignore absolute paths this will be reenabled * Configure markdownlint to ignore vendor folder --------- Signed-off-by: Dan Webb <[email protected]>
- Loading branch information
Showing
26 changed files
with
178 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: bundler | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: bundler | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
name: "Test" | ||
|
||
"on": | ||
pull_request: | ||
|
||
jobs: | ||
lint-unit: | ||
uses: test-kitchen/.github/.github/workflows/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
name: release-please | ||
|
||
"on": | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
release-type: ruby | ||
package-name: busser-bats | ||
version-file: lib/busser/bats/version.rb | ||
token: ${{ secrets.PORTER_GITHUB_TOKEN }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
if: ${{ steps.release.outputs.release_created }} | ||
|
||
- name: Build and publish to GitHub Package | ||
uses: actionshub/publish-gem-to-github@main | ||
if: ${{ steps.release.outputs.release_created }} | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
owner: ${{ secrets.OWNER }} | ||
|
||
- name: Build and publish to RubyGems | ||
uses: actionshub/publish-gem-to-rubygems@main | ||
if: ${{ steps.release.outputs.release_created }} | ||
with: | ||
token: ${{ secrets.RUBYGEMS_API_KEY }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ spec/reports | |
test/tmp | ||
test/version_tmp | ||
tmp | ||
reports.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"fix": false, | ||
"globs": ["**/*.md", "!vendor"], | ||
// "ignores": ["ignore*.md"], | ||
"noProgress": false, | ||
"showFound": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
default: true | ||
MD013: false | ||
MD024: false | ||
MD026: false | ||
MD036: false | ||
MD012: false | ||
MD029: false | ||
MD004: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
Style/ClassAndModuleChildren: | ||
--- | ||
require: | ||
- chefstyle | ||
|
||
AllCops: | ||
TargetRubyVersion: 2.7 | ||
Include: | ||
- "**/*.rb" | ||
Exclude: | ||
- lib/busser/runner_plugin/bats.rb | ||
- "vendor/**/*" | ||
- "spec/**/*" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ruby 2.7.2 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# <a name="title"></a> Busser::RunnerPlugin::Bats | ||
# Busser::RunnerPlugin::Bats | ||
|
||
[![Gem Version](https://badge.fury.io/rb/busser-bats.png)](http://badge.fury.io/rb/busser-bats) | ||
[![Build Status](https://travis-ci.org/test-kitchen/busser-bats.png?branch=master)](https://travis-ci.org/test-kitchen/busser-bats) | ||
|
@@ -10,15 +10,15 @@ A Busser runner plugin for [Bats][bats_site] | |
|
||
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 | ||
|
||
Until proper reference documentation is complete, the [Writing a Test](http://kitchen.ci/docs/getting-started/writing-test) section of the Test Kitchen's [Getting Started Guide](http://kitchen.ci/docs/getting-started/) gives a working example of creating a bats test. | ||
|
||
## <a name="usage"></a> Usage | ||
## Usage | ||
|
||
**TODO:** Write documentation explaining the structure/format of testing files. | ||
|
||
## <a name="development"></a> Development | ||
## Development | ||
|
||
* Source hosted at [GitHub][repo] | ||
* Report issues/questions/feature requests on [GitHub Issues][issues] | ||
|
@@ -33,11 +33,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] (<[email protected]>) | ||
|
||
## <a name="license"></a> License | ||
## License | ||
|
||
Apache 2.0 (see [LICENSE][license]) | ||
|
||
|
@@ -48,6 +48,5 @@ Apache 2.0 (see [LICENSE][license]) | |
[issues]: https://github.com/fnichol/busser-bats/issues | ||
[license]: https://github.com/fnichol/busser-bats/blob/master/LICENSE | ||
[repo]: https://github.com/fnichol/busser-bats | ||
[plugin_usage]: http://docs.kitchen-ci.org/busser/plugin-usage | ||
|
||
[bats_site]: https://github.com/sstephenson/bats |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
default: --publish-quiet --format pretty --format html --out reports.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Commenting out this test for now as it is not working on MacOS due to permissions (stop writing to /opt!) | ||
# undefined method `check_directory_presence' for #<Object:0x000000013ae8cc78> (NoMethodError) | ||
# features/plugin_install_command.feature:11:in `the vendor directory named "bats" should exist' | ||
# Feature: Plugin install command | ||
# In order to use this plugin | ||
# As a user of Busser | ||
# I want to run the postinstall for this plugin | ||
|
||
# Background: | ||
# Given a test BUSSER_ROOT directory named "busser-bats-install" | ||
|
||
# Scenario: Running the postinstall generator | ||
# When I run `busser plugin install busser-bats --force-postinstall` | ||
# Then the vendor directory named "bats" should exist | ||
# And the vendor file "bats/bin/bats" should contain "BATS_PREFIX=" | ||
# And the output should contain "Installed Bats" | ||
# And the exit status should be 0 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
# -*- encoding: utf-8 -*- | ||
|
||
require "aruba/cucumber" | ||
require "busser/cucumber" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Feature: Test command | ||
In order to run tests written with bats | ||
As a user of Busser | ||
I want my tests to run when the bats runner plugin is installed | ||
|
||
Background: | ||
Given a test BUSSER_ROOT directory named "busser-bats-test" | ||
When I successfully run `busser plugin install busser-bats --force-postinstall` | ||
Given a suite directory named "bats" | ||
|
||
# Scenario: A passing test suite | ||
# Given a file in suite "bats" named "default.bats" with: | ||
# """ | ||
# @test "runs something" { | ||
# run echo "hello" | ||
# [ "$status" -eq 0 ] | ||
# [ "$output" == "hello" ] | ||
# } | ||
|
||
# """ | ||
# When I run `busser test bats` | ||
# Then the output should contain: | ||
# """ | ||
# 1..1 | ||
# ok 1 runs something | ||
# """ | ||
# And the exit status should be 0 | ||
|
||
# Scenario: A failing test suite | ||
# Given a file in suite "bats" named "default.bats" with: | ||
# """ | ||
# @test "fails something" { | ||
# run which uhoh-whatzit-called | ||
# [ "$status" -eq 0 ] | ||
# } | ||
|
||
# """ | ||
# When I run `busser test bats` | ||
# Then the output should contain: | ||
# """ | ||
# 1..1 | ||
# not ok 1 fails something | ||
# """ | ||
# And the exit status should not be 0 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.