From 01daea059a266280251b734f5ea8df20f66ec14f Mon Sep 17 00:00:00 2001 From: everpcpc Date: Wed, 17 Jan 2024 10:39:51 +0800 Subject: [PATCH] chore(ci): separate build & publish and add lint --- .github/workflows/python.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index a37724c..8c1546f 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -18,8 +18,26 @@ concurrency: cancel-in-progress: true jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Lint + working-directory: python + run: | + pipenv install --dev + pipenv run flake8 databend_udf + pipenv run black --check databend_udf + - name: build + working-directory: python + run: | + python -m pip install build + python -m build + publish: runs-on: ubuntu-latest + needs: build + if: github.event_name == 'push' permissions: contents: read id-token: write @@ -34,7 +52,6 @@ jobs: python -m pip install build python -m build - uses: pypa/gh-action-pypi-publish@release/v1 - if: github.event_name == 'push' with: packages-dir: python/dist/ skip-existing: true