mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-03 16:32:15 +02:00
Setup initial CI gating on tests and add linting tests (#85)
* add flake, black, mypy, and bandit to run * fixes issues flake and black complained about * make mypy run successfully, add configuration files rather than specifying in ci * respond to feedback * configure bandit, ignore a file used only in local development
This commit is contained in:
parent
e288578028
commit
8f41050f76
12 changed files with 124 additions and 71 deletions
35
.github/workflows/test.yaml
vendored
Normal file
35
.github/workflows/test.yaml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
# test.yml
|
||||
name: Testing
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
python-linting:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.10
|
||||
uses: actions/setup-python@v3
|
||||
- name: Install linters
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install bandit black flake8 mypy types-requests
|
||||
- name: Lint with flake8
|
||||
working-directory: ./src
|
||||
run: flake8 . --count --show-source --statistics
|
||||
- name: Check formatting with black
|
||||
working-directory: ./src
|
||||
run: black --check .
|
||||
- name: Run type checking
|
||||
working-directory: ./src
|
||||
run: mypy .
|
||||
- name: Run bandit security scanning
|
||||
working-directory: ./src
|
||||
run: bandit -r .
|
Loading…
Add table
Add a link
Reference in a new issue