diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml new file mode 100644 index 0000000..d668490 --- /dev/null +++ b/.github/workflows/mypy.yaml @@ -0,0 +1,37 @@ +name: MYPY Check + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.8, 3.9, '3.10'] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: 1.6.1 + + - name: Install Dependencies + run: poetry install --with dev + + - name: Mypy Check + run: | + poetry run mypy --install-types + poetry run mypy excore/ diff --git a/tests/init.py b/tests/init.py index cae9ede..eaca054 100644 --- a/tests/init.py +++ b/tests/init.py @@ -1,7 +1,10 @@ +import os import subprocess import toml +import excore + predefined_inputs = { "name": "tests", "src": "source_code", @@ -41,6 +44,7 @@ def init(): toml.dump(cfg, f) excute("excore update") excute("excore auto-register") + assert os.path.exists(os.path.join(excore.workspace.cache_base_dir, "tests")) if __name__ == "__main__":