Skip to content
New issue

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

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

Already on GitHub? # to your account

Trying to make CI better #19

Merged
merged 5 commits into from
Nov 28, 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
10 changes: 6 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ concurrency:
jobs:
test-ipython:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
Expand All @@ -33,6 +34,7 @@ jobs:

test-evcxr:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
Expand All @@ -59,6 +61,7 @@ jobs:

test-irkernel:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
Expand All @@ -67,12 +70,10 @@ jobs:
uses: r-lib/actions/setup-r@v2

- name: Cache R packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ runner.workspace }}/R/library
path: ${{ env.R_LIBS_USER }}
key: R-packages-${{ runner.os }}
restore-keys: |
R-packages-${{ runner.os }}

- name: Install IRkernel
run: Rscript -e 'install.packages("IRkernel")'
Expand All @@ -87,6 +88,7 @@ jobs:

test-deno:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 5 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
use kernel_sidecar_rs::client::Client;
use kernel_sidecar_rs::handlers::{DebugHandler, Handler};
use kernel_sidecar_rs::kernels::JupyterKernel;
use tokio::time::sleep;

use std::sync::Arc;
use std::time::Duration;

#[tokio::main]
async fn main() {
let kernel = JupyterKernel::ipython(false);
let kernel = JupyterKernel::deno(false);
let client = Client::new(kernel.connection_info.clone()).await;
client.heartbeat().await;
// small sleep to make sure iopub is connected,
sleep(Duration::from_millis(50)).await;

let handler = DebugHandler::new();
let handlers = vec![Arc::new(handler) as Arc<dyn Handler>];
Expand Down
2 changes: 1 addition & 1 deletion tests/test_kernels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async fn start_kernel() -> (JupyterKernel, Client) {
// Could be totally wrong.
// Separately, there may be an edge case where multiple JupyterKernel::ipython calls end up
// with the same ports and it all blows up. TODO: fix that.
tokio::time::sleep(tokio::time::Duration::from_millis(100)).await;
tokio::time::sleep(tokio::time::Duration::from_millis(200)).await;
(kernel, client)
}

Expand Down