Skip to content

Commit

Permalink
Update python-publish.yml
Browse files Browse the repository at this point in the history
the `deploy:needs:[test]` should not publish when the tests are failing cf. https://stackoverflow.com/a/63148947/1200070
  • Loading branch information
mircealungu authored Apr 27, 2024
1 parent 1945759 commit f10dbb1
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,36 @@ on:
- master

jobs:
deploy:

test:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools --upgrade
pip install -r requirements-dev.txt
- name: Lint with flake8
run: |
flake8 . --exit-zero --max-line-length=100 --ignore=F401,W503 --max-complexity=10 --max-line-length=100
- name: Test with pytest
run: |
pytest
deploy:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand Down

0 comments on commit f10dbb1

Please sign in to comment.