From a4e68e34b0ccfff259d6e2dd622fc8f21cfd814c Mon Sep 17 00:00:00 2001 From: Michael Bradley Date: Sun, 23 Feb 2025 07:11:58 -0500 Subject: [PATCH] Try using setup-python --- .forgejo/workflows/lint.yaml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.forgejo/workflows/lint.yaml b/.forgejo/workflows/lint.yaml index 636830b..c2d83ae 100644 --- a/.forgejo/workflows/lint.yaml +++ b/.forgejo/workflows/lint.yaml @@ -6,20 +6,16 @@ name: Lint jobs: lint: name: MyPy - runs-on: docker + runs-on: ubuntu-22.04 steps: - - name: Checkout + - name: Checkout the code uses: actions/checkout@v4 - # TODO: Replace with working action - - name: Set up Python environment - run: | - curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py - python3 get-pip.py - python3 -m pip install virtualenv - python3 -m virtualenv venv - source venv/bin/activate - pip install -r requirements.txt - - name: Type-check - run: | - source venv/bin/activate - mypy *.py + - name: Set up the Python toolchain + uses: actions/setup-python@v5 + with: + python-version: "3.13" + cache: pip + - name: Set up the Python environment + run: pip install -r requirements.txt + - name: Type-check the code + run: mypy *.py