-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci[python]: Separate linting from testing (#4795)
- Loading branch information
Showing
8 changed files
with
104 additions
and
52 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
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,51 @@ | ||
name: Lint Python | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'py-polars/**' | ||
- '.github/workflows/lint-python.yaml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: py-polars | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
cache: 'pip' | ||
cache-dependency-path: 'py-polars/requirements-lint.txt' | ||
- name: Install Python dependencies | ||
run: | | ||
pip install --upgrade pip | ||
pip install -r requirements-lint.txt | ||
- name: Lint Python | ||
run: | | ||
black --check . | ||
blackdoc --check . | ||
isort --check . | ||
pyupgrade --py37-plus `find . -name "*.py" -type f` | ||
flake8 | ||
- name: Set up Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly-2022-08-22 | ||
components: rustfmt, clippy | ||
- name: Cache Rust | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: py-polars | ||
- name: Lint Rust | ||
run: | | ||
cargo fmt --all -- --check | ||
make clippy |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
black==22.8.0 | ||
blackdoc==0.3.6 | ||
flake8==5.0.4 | ||
flake8-bugbear==22.8.23 | ||
flake8-comprehensions==3.10.0 | ||
flake8-docstrings==1.6.0 | ||
flake8-simplify==0.19.3 | ||
flake8-tidy-imports==4.8.0 | ||
isort==5.10.1 | ||
pyupgrade==2.37.3 |