Skip to content

Commit

Permalink
chore(ci): separate build & publish and add lint
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc committed Jan 17, 2024
1 parent ba773d3 commit 4c722bd
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: test
if: github.event_name == 'push'
permissions:
contents: read
id-token: write
Expand All @@ -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

0 comments on commit 4c722bd

Please sign in to comment.