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

Replace bats embed with bats-core submodule #241

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
# Force the bash scripts to be checked out with LF line endings.
git-secrets text eol=lf
git-secrets.1 text eol=lf
test/bats/bin/* text eol=lf
test/bats/libexec/* text eol=lf
*.bats text eol=lf
*.bash text eol=lf
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ on:
push:
branches:
- 'master'
pull_request: {}
pull_request:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- run: make test
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "test/bats-core"]
path = test/bats-core
url = https://github.com/bats-core/bats-core.git
14 changes: 12 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ information to effectively respond to your bug report or contribution.

We welcome you to use the GitHub issue tracker to report bugs or suggest features.

When filing an issue, please check [existing open](https://github.com/awslabs/git-secrets/issues), or [recently closed](https://github.com/awslabs/git-secrets/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
When filing an issue, please check [existing open](https://github.com/awslabs/git-secrets/issues), or [recently closed](https://github.com/awslabs/git-secrets/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:

* A reproducible test case or series of steps
* The version of our code being used
Expand All @@ -21,6 +20,7 @@ reported the issue. Please try to include as much information as you can. Detail


## Contributing via Pull Requests

Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:

1. You are working against the latest source on the *master* branch.
Expand All @@ -41,16 +41,26 @@ GitHub provides additional document on [forking a repository](https://help.githu


## Finding contributions to work on

Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/awslabs/git-secrets/labels/help%20wanted) issues is a great place to start.


## Testing

We use [bats-core](https://github.com/bats-core/bats-core) for testing. It is configured as a submodule of this repository, which will be checked out automatically by `make test` if necessary.

New functionality should include new tests. The existing tests in `test/*.bats` can be used as examples.


## Code of Conduct

This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
[email protected] with any additional questions or comments.


## Security issue notifications

If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.


Expand Down
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ help:
@echo " man to build the man file from README.rst"
@echo " install to install. Use PREFIX and MANPREFIX to customize."

# We use bats for testing: https://github.com/sstephenson/bats
test:
LANG=C test/bats/bin/bats test/
# We use bats-core for testing: https://github.com/bats-core/bats-core
test: test/bats-core/bin/bats
@LANG=C test/bats-core/bin/bats test/

test/bats-core/bin/bats:
@git submodule init test/bats-core
@git submodule update test/bats-core

# The man page is completely derived from README.rst. Edits to
# README.rst require a rebuild of the man page.
man:
rst2man.py README.rst > git-secrets.1
@rst2man.py README.rst > git-secrets.1

install:
@mkdir -p ${DESTDIR}${MANPREFIX}
Expand Down
4 changes: 0 additions & 4 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
git-secrets
Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.

bats
This product bundles bats, which is available under a "MIT" license.
For details, see test/bats.
1 change: 1 addition & 0 deletions test/bats-core
Submodule bats-core added at 6636e2
20 changes: 0 additions & 20 deletions test/bats/LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion test/bats/bin/bats

This file was deleted.

142 changes: 0 additions & 142 deletions test/bats/libexec/bats

This file was deleted.

55 changes: 0 additions & 55 deletions test/bats/libexec/bats-exec-suite

This file was deleted.

Loading