Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding bun step to CI #115

Merged
merged 6 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/create-js-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ jobs:
yarn build --target=aarch64-unknown-linux-musl
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip polars/*.node

name: ${{ matrix.settings.target }} - node@16
name: ${{ matrix.settings.target }} - node@20
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
if: ${{ !matrix.settings.docker }}
with:
node-version: 16
node-version: 20
check-latest: true
cache: yarn
- name: Copy rust-toolchain to root
Expand All @@ -135,7 +135,7 @@ jobs:
uses: actions/cache@v3
with:
path: .yarn/cache
key: npm-cache-build-${{ matrix.settings.target }}-node@16
key: npm-cache-build-${{ matrix.settings.target }}-node@20
- name: Setup toolchain
run: ${{ matrix.settings.setup }}
if: ${{ matrix.settings.setup }}
Expand All @@ -149,7 +149,7 @@ jobs:
uses: actions/setup-node@v3
if: matrix.settings.target == 'i686-pc-windows-msvc'
with:
node-version: 16
node-version: 20
check-latest: true
cache: yarn
architecture: x86
Expand All @@ -175,7 +175,7 @@ jobs:
- build
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install dependencies
run: yarn install
- name: Download all artifacts
Expand All @@ -191,10 +191,10 @@ jobs:
- test-macos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "20"
registry-url: "https://registry.npmjs.org"
cache: yarn
cache-dependency-path: yarn.lock
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,22 @@ jobs:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install latest Rust nightly
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2023-07-27
override: true
components: rustfmt, clippy
- name: Install ghp-import
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ghp-import
- name: Set up Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 20
- name: Build node reference
Expand Down
37 changes: 32 additions & 5 deletions .github/workflows/test-js.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
name: Test
on: pull_request
jobs:
test-js:
test-node:
runs-on: ubuntu-latest
name: "${{ matrix.os }} node:${{ matrix.node }}"
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
node: ["18", "20"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
cache-dependency-path: yarn.lock
- name: Install latest Rust nightly
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2023-07-27
override: true
components: rustfmt, clippy
- run: yarn --version
- name: Install Node Dependencies
Expand All @@ -32,3 +31,31 @@ jobs:
run: yarn test
- name: Build JS
run: yarn build:ts
test-bun:
runs-on: ubuntu-latest
name: "${{ matrix.os }} bun:${{ matrix.bun }}"
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
bun: ["1"]
steps:
- uses: actions/checkout@v4
- name: Install latest Rust nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2023-07-27
components: rustfmt, clippy
- name: Bun version
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Bun Install Dependencies
run: bun install
- name: Bun Build Binary
run: bun run build:debug
- name: Bun Run Linting
run: bun lint:ts
- name: Bun Run Tests
run: bun run test
- name: Bun Build JS
run: bun run build:ts
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@
"precommit": "yarn lint && yarn test"
},
"devDependencies": {
"@biomejs/biome": "^1.0.0",
"@biomejs/biome": "^1.1.2",
"@napi-rs/cli": "^2.16.3",
"@types/chance": "^1.1.4",
"@types/jest": "^29.5.4",
"@types/node": "^20.5.9",
"@types/node": "^20.6.0",
"chance": "^1.1.11",
"jest": "^29.6.4",
"jest": "^29.7.0",
"source-map-support": "^0.5.21",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
Expand Down
2 changes: 1 addition & 1 deletion polars/dataframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2074,7 +2074,7 @@ export const _DataFrame = (_df: any): DataFrame => {
return _df.toRows();
},
sample(opts?, frac?, withReplacement = false, seed?) {
// rome-ignore lint/style/noArguments: <explanation>
// biome-ignore lint/style/noArguments: <explanation>
if (arguments.length === 0) {
return wrap("sampleN", 1, withReplacement, false, seed);
}
Expand Down
4 changes: 2 additions & 2 deletions polars/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ export namespace pl {
export import Bool = DataType.Bool;
export import Utf8 = DataType.Utf8;
export import List = DataType.List;
// rome-ignore lint/suspicious/noShadowRestrictedNames: pl.Date
// biome-ignore lint/suspicious/noShadowRestrictedNames: pl.Date
export import Date = DataType.Date;
export import Datetime = DataType.Datetime;
export import Time = DataType.Time;
// rome-ignore lint/suspicious/noShadowRestrictedNames: pl.Object
// biome-ignore lint/suspicious/noShadowRestrictedNames: pl.Object
export import Object = DataType.Object;
export import Null = DataType.Null;
export import Struct = DataType.Struct;
Expand Down
2 changes: 1 addition & 1 deletion polars/series/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,7 @@ export function _Series(_s: any): Series {
return dtypeWrap("SetWithMask", mask.inner(), value);
},
sample(opts?, frac?, withReplacement = false, seed?) {
// rome-ignore lint/style/noArguments: <explanation>
// biome-ignore lint/style/noArguments: <explanation>
if (arguments.length === 0) {
return wrap("sampleN", 1, withReplacement, false, seed);
}
Expand Down
Loading