Skip to content

Commit

Permalink
run tests before pypi publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Leggin committed Apr 23, 2023
1 parent 54f25ff commit da9bc4e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,30 @@ on:


jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py')
- name: Test with pytest
run: |
pytest
build-n-publish:
name: Build and publish Python dist to PyPI
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit da9bc4e

Please sign in to comment.