Skip to content

Commit

Permalink
more conditional ci runs (#2103)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Dec 21, 2021
1 parent b08be5e commit 76aa73c
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 82 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Benchmark

on:
- pull_request
pull_request:
paths:
- 'polars/**'
jobs:
test:
runs-on: ubuntu-latest
Expand Down
52 changes: 5 additions & 47 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Build and test
name: Build and test rust

on:
- pull_request
pull_request:
paths:
- 'polars/**'
jobs:

test-rust:
name: Build and test Rust
runs-on: ubuntu-latest
Expand Down Expand Up @@ -61,48 +64,3 @@ jobs:
cargo miri setup
cargo clean
make miri
test-python:
name: Build and test Python
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.6", "3.10" ]
steps:
- uses: actions/checkout@v2
- name: Install latest Rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-12-02
override: true
components: rustfmt, clippy
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r py-polars/build.requirements.txt
- name: Run formatting checks
run: |
cd py-polars && black --check . && blackdoc --check . && isort --check . && rustup override set nightly-2021-12-02 && cargo fmt --all -- --check && cd ..
- name: Run linting
run: |
cd py-polars && flake8 && cd ..
- name: Run type checking
run: |
cd py-polars && mypy && cd ..
- name: Run tests
run: |
export RUSTFLAGS="-C debuginfo=0"
cd py-polars && rustup override set nightly-2021-12-02 && make venv && make test-with-cov
cargo clippy
- name: Check doc examples
run: |
cd py-polars && make doctest
# test if we can import polars without any requirements
- name: Import polars
run: |
pip uninstall pandas -y
python -c "import polars"
4 changes: 3 additions & 1 deletion .github/workflows/docs_check.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Docs check

on:
- pull_request
pull_request:
paths:
- 'py-polars/**'
jobs:
test:
name: Docs check
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/test-python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test python

on:
pull_request:
paths:
- 'py-polars/**'
- 'polars/**'
jobs:
test-python:
name: Build and test Python
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.6", "3.10" ]
steps:
- uses: actions/checkout@v2
- name: Install latest Rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-12-02
override: true
components: rustfmt, clippy
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r py-polars/build.requirements.txt
- name: Run formatting checks
run: |
cd py-polars && black --check . && blackdoc --check . && isort --check . && rustup override set nightly-2021-12-02 && cargo fmt --all -- --check && cd ..
- name: Run linting
run: |
cd py-polars && flake8 && cd ..
- name: Run type checking
run: |
cd py-polars && mypy && cd ..
- name: Run tests
run: |
export RUSTFLAGS="-C debuginfo=0"
cd py-polars && rustup override set nightly-2021-12-02 && make venv && make test-with-cov
cargo clippy
- name: Check doc examples
run: |
cd py-polars && make doctest
# test if we can import polars without any requirements
- name: Import polars
run: |
pip uninstall pandas -y
python -c "import polars"
37 changes: 37 additions & 0 deletions .github/workflows/test-windows-python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Windows tests python

on:
pull_request:
paths:
- 'py-polars/**'
jobs:
test-python:
name: Build and test Python
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install latest Rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-12-02
override: true
components: rustfmt, clippy
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r py-polars/build.requirements.txt
- name: Run tests
shell: bash
run: |
export RUSTFLAGS="-C debuginfo=0"
cd py-polars && rustup override set nightly-2021-12-02 && make build-and-test-no-venv
cargo clippy
# test if we can import polars without any requirements
- name: Import polars
run: |
pip uninstall pandas -y
python -c "import polars"
38 changes: 5 additions & 33 deletions .github/workflows/test-windows.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Windows tests
name: Windows tests rust

on:
- pull_request
pull_request:
paths:
- 'py-polars/**'
- 'polars/**'
jobs:
test-rust:
runs-on: windows-latest
Expand All @@ -15,34 +18,3 @@ jobs:
- name: Run tests
run: |
cd polars && make test
test-python:
name: Build and test Python
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install latest Rust nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2021-12-02
override: true
components: rustfmt, clippy
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r py-polars/build.requirements.txt
- name: Run tests
shell: bash
run: |
export RUSTFLAGS="-C debuginfo=0"
cd py-polars && rustup override set nightly-2021-12-02 && make build-and-test-no-venv
cargo clippy
# test if we can import polars without any requirements
- name: Import polars
run: |
pip uninstall pandas -y
python -c "import polars"

0 comments on commit 76aa73c

Please sign in to comment.