Derive Clone
on Tokenizer
, add Encoding.into_tokens()
method
#2051
Workflow file for this run
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
name: Node | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- bindings/python/** | |
pull_request: | |
paths-ignore: | |
- bindings/python/** | |
jobs: | |
build_and_test: | |
name: Check everything builds | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
# Necessary for now for the cargo cache: https://github.com/actions/cache/issues/133#issuecomment-599102035 | |
- run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/ | |
- name: Cache Cargo Registry | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/registry | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install Node 12.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 12.x | |
- name: Get NPM cache directory | |
id: npm-cache | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- name: Cache NPM cache | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.npm-cache.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install npm dependencies | |
working-directory: ./bindings/node | |
run: npm ci --ignore-scripts | |
- name: Build all | |
working-directory: ./bindings/node | |
run: node build.js --all | |
- name: Lint Rust formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --manifest-path ./bindings/node/native/Cargo.toml -- --check | |
- name: Lint Rust with Clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --manifest-path ./bindings/node/native/Cargo.toml --all-targets --all-features -- -D warnings | |
- name: Lint TS | |
working-directory: ./bindings/node | |
run: npm run lint-check | |
- name: Run JS tests | |
working-directory: ./bindings/node | |
run: make test |