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 ab62ffb
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,29 @@ concurrency:
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- 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 +55,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 ab62ffb

Please sign in to comment.