Skip to content

fix(rust): Fix datetime cast behavior for pre-epoch times #13068

fix(rust): Fix datetime cast behavior for pre-epoch times

fix(rust): Fix datetime cast behavior for pre-epoch times #13068

Workflow file for this run

name: Test Rust
on:
pull_request:
paths:
- crates/**
- examples/**
- Cargo.toml
- .github/workflows/test-rust.yml
push:
branches:
- main
paths:
- crates/**
- examples/**
- Cargo.toml
- .github/workflows/test-rust.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down
RUST_BACKTRACE: 1
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Rust
run: rustup show
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref_name == 'main' }}
- name: Compile tests
run: >
cargo test --all-features --no-run
-p polars-arrow
-p polars-compute
-p polars-core
-p polars-io
-p polars-lazy
-p polars-ops
-p polars-parquet
-p polars-plan
-p polars-row
-p polars-sql
-p polars-time
-p polars-utils
- name: Run tests
if: github.ref_name != 'main'
run: >
cargo test --all-features
-p polars-arrow
-p polars-compute
-p polars-core
-p polars-io
-p polars-lazy
-p polars-ops
-p polars-parquet
-p polars-plan
-p polars-row
-p polars-sql
-p polars-time
-p polars-utils
integration-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Rust
run: rustup show
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref_name == 'main' }}
- name: Compile integration tests
run: cargo test --all-features -p polars --test it --no-run
- name: Run integration tests
if: github.ref_name != 'main'
run: cargo test --all-features -p polars --test it
check-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
run: rustup show
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref_name == 'main' }}
- name: Install cargo hack
uses: taiki-e/install-action@v2
with:
tool: cargo-hack
- name: Run cargo hack
run: cargo hack check -p polars --each-feature --no-dev-deps
check-wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust
run: |
rustup target add wasm32-unknown-unknown
rustup show
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref_name == 'main' }}
- name: Install cargo hack
uses: taiki-e/install-action@v2
with:
tool: cargo-hack
- name: Check wasm
working-directory: crates
run: make check-wasm