Skip to content
Merged
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
21 changes: 0 additions & 21 deletions .evergreen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,6 @@ functions:
- clusterwide
binary: scripts/ci/run_test.sh

mypy_linting_test:
- command: subprocess.exec
type: test
params:
working_dir: mongodb-kubernetes-operator
binary: scripts/ci/run_mypy_check.sh


build_and_push_image:
- command: subprocess.exec
Expand Down Expand Up @@ -204,13 +197,6 @@ tasks:
image_type: versionhook
expire_after: 48h

- name: mypy_linting
commands:
- func: clone
- func: setup_virtualenv
- func: mypy_linting_test


- name: e2e_test_feature_compatibility_version
commands:
- func: run_e2e_test
Expand Down Expand Up @@ -350,13 +336,6 @@ buildvariants:
tasks:
- name: e2e_test_group

- name: code_health
display_name: code_health
run_on:
- ubuntu1604-build
tasks:
- name: mypy_linting

- name: init_test_run
display_name: init_test_run
run_on:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/code_health.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ jobs:

- name: Black Check
uses: jpetrucciani/black-check@20.8b1

Mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Mypy linting
uses: jpetrucciani/mypy-check@master
with:
path: scripts/*/*.py
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't 100% the same as before.
Before we were using some ugly bash magic to get all python files, we can't do that with this (or other github actions) and we need to either specify the folders containing python files or some magic globbing like this.

A glob that would work would be **/*.py but that syntax breaks github actions :(

Three possibilities here:

  1. Trust that all python files will always be in scripts/*/ or that we will remember to change this
  2. Close this PR and leave mypy checks in evg
  3. Create a docker image that works for us

I'm open to both 1 and 2, I won't have time to do 3 for sure :)

8 changes: 8 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Global options:

[mypy]
python_version = 3.7
ignore_missing_imports = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
5 changes: 0 additions & 5 deletions scripts/ci/run_mypy_check.sh

This file was deleted.