clippy + fmt #112
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: Tests | |
on: [push] | |
concurrency: | |
group: tests-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test-ipython: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
# Install IPython kernel -- tests will launch one kernel process per test | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install IPython Kernel | |
run: | | |
python -m pip install ipykernel | |
python -m ipykernel install --user --name=python3.10 | |
- name: Set up Rust 1.74.0 | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: '1.74.0' | |
- name: Run tests | |
run: cargo test --features test_ipython | |
test-evcxr: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Rust 1.74.0 | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: '1.74.0' | |
# Cache Evcxr installation | |
- name: Cache Evcxr installation | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/bin | |
key: ${{ runner.os }}-evcxr-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install evcxr-jupyter | |
run: | | |
cargo install evcxr_jupyter | |
evcxr_jupyter --install | |
- name: Run tests | |
run: cargo test --features test_evcxr | |
test-irkernel: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up R (release) | |
uses: r-lib/actions/setup-r@v2 | |
- name: Cache R packages | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.R_LIBS_USER }} | |
key: R-packages-${{ runner.os }} | |
- name: Install IRkernel | |
run: Rscript -e 'install.packages("IRkernel")' | |
- name: Set up Rust 1.74.0 | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: '1.74.0' | |
- name: Run tests | |
run: cargo test --features test_irkernel | |
test-deno: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Deno stable release | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Install Deno Jupyter kernel | |
run: deno jupyter --unstable --install | |
- name: Set up Rust 1.74.0 | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: '1.74.0' | |
- name: Run tests | |
run: cargo test --features test_deno | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Rust Nightly | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: 'nightly' | |
components: rustfmt,clippy | |
- name: Check code format | |
run: cargo fmt -- --check | |
- name: Check clippy | |
run: cargo clippy -- -D warnings | |