From bb7be1fd7cc28485675d7f50ab5542a74e3c7751 Mon Sep 17 00:00:00 2001 From: Guillaume VIGNAL Date: Mon, 16 Sep 2024 16:32:30 +0200 Subject: [PATCH] github action updated for pyproject.toml --- .github/workflows/main.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3bf3a83..0fd2009 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,23 +15,28 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | - python -m pip install --upgrade pip wheel setuptools - pip install flake8 pytest + python -m pip install --upgrade pip + pip install build flake8 pytest if [ -f requirements.dev.txt ]; then pip install -r requirements.dev.txt; fi + - name: Lint with flake8 run: | # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest run: | python -m pytest + - name: Build python package run: | - python setup.py sdist bdist_wheel + python -m build + - name: Deploy to PyPI if: success() && startsWith(github.ref, 'refs/tags') && matrix.python-version == '3.10' uses: pypa/gh-action-pypi-publish@master