Skip to content

Commit

Permalink
try to run tests and linting in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kafonek committed Nov 23, 2023
1 parent 0b8687e commit c4e5bcd
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Tests

on: [push]

concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain-version: 'nightly'
components: rustfmt

- name: Check code format
run: cargo fmt -- --check

- name: Check clippy
run: cargo clippy -- -D warnings
41 changes: 41 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Tests

on: [push]

concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

# Set up the IPython Kernel fixture
- 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: Run ipykernel
run: python -m ipykernel_launcher --debug -f /tmp/kernel.json & echo "KERNEL_PID=$!" >> $GITHUB_ENV

- name: Set up Rust 1.74.0
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain-version: '1.74.0'
profile: minimal

- name: Run tests
run: cargo test

- name: Stop ipykernel
run: kill $KERNEL_PID


0 comments on commit c4e5bcd

Please sign in to comment.