Mongo enhancements #2
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
name: "Run Static tests" | |
on: [workflow_dispatch, pull_request] | |
jobs: | |
lint-test: | |
name: "Run Security & Linting Tests" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install dev dependencies | |
run: python -m pip install -U pip flake8 bandit mypy future_fstrings | |
- name: Run Security Tests | |
run: | | |
bandit -c .bandit -r sumomongodbatlascollector/ -f custom | |
- name: Run Linting Tests | |
run: | | |
flake8 --max-line-length=120 --ignore=E231,E225,F541,E501,E402,F841,W605,E731,E722,C901,F821 sumomongodbatlascollector/ | |
# - name: Static Type Checks | |
# continue-on-error: true | |
# run: | | |
# cd sumomongodbatlascollector/ | |
# mypy --install-types ./main.py | |
# mypy ./main.py --disable-error-code=import-untyped | |
# mypy --install-types ./api.py | |
# mypy ./api.py --disable-error-code=import-untyped | |
run-test: | |
name: "Run Build and Install Tests" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install build dependencies | |
run: | | |
python -m pip install -U pip wheel setuptools | |
- name: "Install Requirements" | |
run: | | |
pip install -r requirements.txt | |
- name: "Install Pytest" | |
run: | | |
pip install pytest | |
- name: "Run Pytest" | |
run: | | |
pytest -vvv sumomongodbatlascollector/test_mongo_collector.py |