Skip to content

Commit

Permalink
👷 Update pylint.yml to include linting and testing steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Senja20 committed Apr 25, 2024
1 parent 17e91b8 commit 3fe8904
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Python CI
on: [push, workflow_dispatch]

jobs:
setup-and-lint:
install:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -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 }}
Expand Down

0 comments on commit 3fe8904

Please sign in to comment.