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 7980a77
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,30 @@ 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'
cache: 'pipenv'
- 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 +56,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 7980a77

Please sign in to comment.