From acb211210e6f5aee9e1a4d1d7e0670f8030ff753 Mon Sep 17 00:00:00 2001 From: whoisjones Date: Thu, 26 Oct 2023 18:04:53 +0200 Subject: [PATCH] lint before publish-package.yml --- .github/workflows/publish-package.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index edb92f3..65584ac 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -5,10 +5,8 @@ on: types: [published] jobs: - build: - name: Build distribution + lint: runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - name: Set up Python @@ -18,13 +16,22 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install pytest pytest-sugar - python -m pip install pylint python -m pip install -r requirements.txt - - name: Lint with pylint - run: python3 -m pylint fabricator - - name: Test with pytest - run: python3 -m pytest tests + pip install pylint + - name: Analysing the code with pylint + run: | + pylint $(git ls-files '*.py') --fail-under 9.3 + + build: + name: Build distribution + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" - name: Install pypa/build run: >- python3 -m @@ -42,6 +49,7 @@ jobs: publish-to-testpypi: name: Publish distribution to TestPyPI needs: + - lint - build runs-on: ubuntu-latest