Skip to content

Commit

Permalink
Merge branch 'release/2.0.0' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dallinb committed Jul 21, 2022
2 parents c2470d3 + 06fc32b commit 0119c0e
Show file tree
Hide file tree
Showing 37 changed files with 1,339 additions and 1,189 deletions.
2 changes: 1 addition & 1 deletion .bandit
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[bandit]
skips: B101
skips: B101,B404
71 changes: 71 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
version: "2" # required to adjust maintainability checks

checks:
argument-count:
enabled: true
config:
threshold: 4
complex-logic:
enabled: true
config:
threshold: 4
file-lines:
enabled: true
config:
threshold: 250
method-complexity:
enabled: true
config:
threshold: 5
method-count:
enabled: true
config:
threshold: 20
method-lines:
enabled: true
config:
threshold: 25
nested-control-flow:
enabled: true
config:
threshold: 4
return-statements:
enabled: true
config:
threshold: 4
similar-code:
enabled: true
config:
threshold: # language-specific defaults. overrides affect all languages.
identical-code:
enabled: true
config:
threshold: # language-specific defaults. overrides affect all languages.

plugins:
markdownlint:
enabled: true
radon:
enabled: true
sonar-python:
enabled: true
config:
tests_patterns:
- tests/**

exclude_patterns:
- "config/"
- "db/"
- "dist/"
- "features/"
- "**/node_modules/"
- "script/"
- "**/spec/"
- "**/test/"
- "**/tests/"
- "Tests/"
- "**/vendor/"
- "**/*_test.go"
- "**/*.d.ts"
- "CHANGELOG.md" # This file is auto-generated.
17 changes: 8 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ name: CI

on:
push:
pull_request:
branches:
- main
branches-ignore:
- 'feature/latest'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -24,13 +23,13 @@ jobs:
python-version: '3.x'

- name: Requirements
run: pip install -r requirements.txt
run: |
pip install -qr requirements.txt
pip freeze
pip check
- name: Bandit
run: bandit -r .

- name: Test
run: make test
- name: Run Make
run: make

- name: Publish Code Coverage
uses: paambaati/[email protected]
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Latest

on:
push:
branches:
- feature/latest
schedule:
- cron: '0 0 1,15 * *'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Requirements
run: |
pip install -qr tests/resources/requirements-latest.txt
pip freeze
pip check
- name: Bandit
run: bandit -r .

- name: Test
run: make test

- name: Build
run: make build
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -qr requirements.txt
- name: Build
run: make build
Expand Down
1 change: 1 addition & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ rules:
level: warning
ignore: |
.github/workflows/ci.yml
.github/workflows/latest.yml
.github/workflows/publish.yml
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
# Changelog


## 1.0.6
## 2.0.0

### New

* Add "When" step to allow skipping of tests depending on environment variable. [Ben Dalling]

### Changes

* Add details on upgrading from 1.X.X to 2.0.0. [Ben Dalling]

* Add the Snyk badge and reduce the size of the step functions. [Ben Dalling]

### Fix

* Refactor Markdown. [Ben Dalling]


## 1.0.6 (2022-07-18)

### Fix

Expand Down
8 changes: 4 additions & 4 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
https://github.com/locp/testinfra-bdd/issues.
info@locp.co.uk.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down Expand Up @@ -116,13 +116,13 @@ the community.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ Things that will make your branch more likely to be pulled:

Tests are run against a branch pushes and pull requests using GitHub
Workflows for this project these are visible at
https://github.com/locp/testinfra-bdd/actions
<https://github.com/locp/testinfra-bdd/actions>

## Cutting a Release

Ensure your local repo is up-to-date:

```shell
git checkout develop
git fetch -p origin && git pull && git pull --tags
Expand All @@ -38,6 +39,7 @@ git pull
```

Now set a shell variable to help us create the release:

```shell
RELEASE='0.1.0'
git flow release start $RELEASE
Expand All @@ -47,6 +49,7 @@ Now edit `testinfra_bdd/__init__.py` and ensure that the `__version__`
variable is set to the same value as `$RELEASE`.

Now update the `CHANGELOG.md` with:

```shell
make changelog
```
Expand All @@ -66,7 +69,7 @@ git flow finish -m "v${RELEASE}" -p
```

When all the CI jobs have completed, create the new release at
https://github.com/locp/testinfra-bdd/releases
<https://github.com/locp/testinfra-bdd/releases>

### Post Release Steps

Expand Down
Loading

0 comments on commit 0119c0e

Please sign in to comment.