-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add style checking workflow and reformat some files
- Loading branch information
Showing
8 changed files
with
195 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.os }} x py${{ matrix.python }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ["3.10", "3.11"] | ||
os: [ubuntu-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Cache venv | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: ${{ runner.os }}-build-${{ matrix.python }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
echo "Cache Version ${{ secrets.CACHE_VERSION }}" | ||
pip install poetry | ||
poetry install | ||
poetry run pip install ERAlchemy | ||
poetry config --list | ||
- name: Print tool versions | ||
run: | | ||
poetry run black --version | ||
- name: Check if the code is formatted | ||
run: poetry run black --check dataprep | ||
|
||
# - name: Type check the project | ||
# run: poetry run pyright dataprep || true | ||
|
||
# - name: Style check the project | ||
# run: poetry run pylint dataprep || true | ||
|
||
- name: Build binary dependencies | ||
run: poetry build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- release | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: "0" | ||
|
||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Cache venv | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: ${{ runner.os }}-build-${{ matrix.python }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
echo "Cache Version ${{ secrets.CACHE_VERSION }}" | ||
pip install poetry toml-cli | ||
poetry install | ||
poetry config --list | ||
- name: Print tool versions | ||
run: | | ||
poetry run black --version | ||
- name: Build wheels | ||
run: poetry build | ||
|
||
- name: Parse version from pyproject.toml | ||
run: echo "DBGPT_HUB_VERSION=`toml get --toml-path pyproject.toml tool.poetry.version`" >> $GITHUB_ENV | ||
|
||
- name: Create release note | ||
run: poetry run python scripts/release-note.py $(git rev-parse --short HEAD) > RELEASE.md | ||
|
||
- uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: "dist/*.whl,dist/*.tar.gz" | ||
bodyFile: "RELEASE.md" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
draft: true | ||
tag: v${{ env.DBGPT_HUB_VERSION }} | ||
commit: ${{ env.GITHUB_SHA }} | ||
|
||
- name: Upload wheels | ||
run: poetry publish --username __token__ --password ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.