From 971b972f0a28c0f472633e051c00eb6ce4f6ef5e Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Sun, 10 Nov 2024 12:46:50 -0400 Subject: [PATCH] feat(mypy): mypy gh action --- .github/workflows/mypy.yaml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/mypy.yaml diff --git a/.github/workflows/mypy.yaml b/.github/workflows/mypy.yaml new file mode 100644 index 00000000..d3bb2719 --- /dev/null +++ b/.github/workflows/mypy.yaml @@ -0,0 +1,41 @@ +name: MyPy + +on: pull_request + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + mypy: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + pyversion: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] + + steps: + - name: Checkout + uses: actions/checkout@v4.1.4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Setup Python (faster than using Python container) + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.pyversion }} + + - name: Install Poetry + uses: snok/install-poetry@v1 + + - name: Add Poetry to PATH on Windows + if: runner.os == 'Windows' + run: $env:Path += ";$env:USERPROFILE\.poetry\bin" + + - name: Install Dependencies + run: poetry install --no-interaction + + - name: Run MyPy + run: make mypy