From 1417ab33cf21602dd40b6c152ab66711090bf151 Mon Sep 17 00:00:00 2001 From: Philip Waggoner <31326382+pdwaggoner@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:57:55 -0700 Subject: [PATCH] adj pylint.yml --- .github/workflows/pylint.yml | 48 +++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index c73e032..cde9ac3 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,23 +1,37 @@ name: Pylint -on: [push] +on: + push: + branches: + - main + pull_request: jobs: - build: + lint-and-test: runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10"] + steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pylint - - name: Analysing the code with pylint - run: | - pylint $(git ls-files '*.py') + # Step 1: Checkout the code + - name: Checkout code + uses: actions/checkout@v3 + + # Step 2: Set up Python + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + # Step 3: Install dependencies + - name: Install dependencies + run: | + pip install flake8 pytest + + # Step 4: Run the linter (flake8) + - name: Lint code + run: | + flake8 . + + # Step 5: Run the tests + - name: Run tests + run: | + pytest dlq_py/tests