From 3fe89044660d75e2d7f2b130ef3f0b0e3bb4c492 Mon Sep 17 00:00:00 2001 From: Yauhen Yavorski Date: Thu, 25 Apr 2024 22:01:35 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20=20Update=20pylint.yml=20to=20in?= =?UTF-8?q?clude=20linting=20and=20testing=20steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pylint.yml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 7f8dc56..5bf6ba2 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -3,7 +3,7 @@ name: Python CI on: [push, workflow_dispatch] jobs: - setup-and-lint: + install: runs-on: ubuntu-latest strategy: matrix: @@ -28,13 +28,35 @@ jobs: run: | python -m pip install --upgrade pip pip install -r requirements.txt - pip install -U pylint + pip install -U pylint pytest + + lint: + needs: install + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11"] + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- - name: Lint Code run: pylint $(git ls-files '*.py') test: - needs: setup-and-lint + needs: install runs-on: ubuntu-latest env: ROBOFLOW_API_KEY: ${{ secrets.ROBOFLOW_API_KEY }}