Skip to content

Commit

Permalink
Merge pull request #191 from gdubicki/tweak_gha
Browse files Browse the repository at this point in the history
Update tests badge to GHA & make it work + start running bandit too
  • Loading branch information
bastelfreak committed Feb 13, 2021
2 parents d3003ff + 01bd2fb commit 653487f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .bandit

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Security tests

on: [push, pull_request]

jobs:
security:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install bandit
- name: Run bandit
run: |
bandit -r pypuppetdb
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: tests (unit)

on: [pull_request]
on: [push, pull_request]

jobs:
test:
Expand Down
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,13 @@ Commits are expected to contain tests or updates to the tests if they add to
or modify the current behavior.

Assuming you have prepared the development environment as explained above,
do this to run the unit tests:
do this to run the tests:

```bash
# Unit tests
py.test
# Security linter
bandit -r pypuppetdb
```

If the tests pass, you're golden. If not we'll have to figure out why
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![PyPi Version](https://img.shields.io/pypi/v/pypuppetdb)](https://pypi.org/project/pypuppetdb/)
[![PyPi Downloads](https://img.shields.io/pypi/dm/pypuppetdb)](https://pypi.org/project/pypuppetdb/)
[![image](https://api.travis-ci.org/voxpupuli/pypuppetdb.png)](https://travis-ci.org/voxpupuli/pypuppetdb)
![Tests Status](https://github.com/voxpupuli/pypuppetdb/workflows/tests%20(unit)/badge.svg)
[![Coverage Status](https://img.shields.io/coveralls/voxpupuli/pypuppetdb.svg)](https://coveralls.io/r/voxpupuli/pypuppetdb)
[![By Voxpupuli](https://img.shields.io/badge/by-Vox%20Pupuli%20%F0%9F%A6%8A-ef902f.svg)](http://voxpupuli.org)

Expand Down

0 comments on commit 653487f

Please sign in to comment.