Skip to content

Commit

Permalink
lint before publish-package.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
whoisjones committed Oct 26, 2023
1 parent 6ae235e commit acb2112
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -42,6 +49,7 @@ jobs:
publish-to-testpypi:
name: Publish distribution to TestPyPI
needs:
- lint
- build
runs-on: ubuntu-latest

Expand Down

0 comments on commit acb2112

Please sign in to comment.