Skip to content

Commit 07cb8a8

Browse files
committed
ci: fix tests and audit workflows
1 parent 05fff4b commit 07cb8a8

10 files changed

Lines changed: 85 additions & 94 deletions

File tree

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ jobs:
77
tests:
88
uses: pimalaya/nix/.github/workflows/tests.yml@master
99
secrets: inherit
10+
with:
11+
docker: docker run --rm -d --publish 8001:8001 whynothugo/vdirsyncer-devkit-radicale

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111

1212
- Init library from io-addressbook
13+
- Init git cliff and changelog
1314

1415
### Changed
1516

@@ -18,7 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1819
### Fixed
1920

2021
- Adjust XML deserialization after real world testing
22+
- Fix tests and audit workflows
2123

2224
[0.0.1]: https://github.com/pimalaya/io-fs/compare/root..v0.0.1
2325

24-
<!-- generated by git-cliff on 2025-10-27T14:31:25.809008026+01:00 -->
26+
<!-- generated by git-cliff on 2025-10-27T19:00:05.105413554+01:00 -->

Cargo.lock

Lines changed: 44 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env_logger = "0.11"
2525
io-fs = { version = "0.0.1", default-features = false, features = ["std"] }
2626
io-stream = { version = "0.0.2", default-features = false, features = ["std"] }
2727
pimalaya-toolbox = { version = "0.0.2", default-features = false, features = ["config", "stream", "rustls-ring"] }
28-
tempdir = "0.3"
28+
tempfile = "3.23"
2929
tokio = { version = "1", features = ["full"] }
3030
uuid = { version = "1", features = ["v4"] }
3131

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# I/O Calendar [![Documentation](https://img.shields.io/docsrs/io-calendar)](https://docs.rs/io-calendar/latest/io_calendar) [![Matrix](https://img.shields.io/matrix/pimalaya:matrix.org?color=success&label=chat)](https://matrix.to/#/#pimalaya:matrix.org)
22

3-
Set of **I/O-free** Rust coroutines to manage contacts, based on [io-fs](https://github.com/pimalaya/io-fs) and [io-stream](https://github.com/pimalaya/io-stream).
3+
Set of **I/O-free** Rust coroutines to manage calendars, based on [io-fs](https://github.com/pimalaya/io-fs) and [io-stream](https://github.com/pimalaya/io-stream).
44

5-
This library allows you to manage contacts using an I/O-agnostic approach, based on 3 concepts:
5+
This library allows you to manage calendars using an I/O-agnostic approach, based on 3 concepts:
66

77
### Coroutine
88

@@ -24,17 +24,31 @@ The loop is the glue between coroutines and runtimes. It makes the coroutine pro
2424

2525
*See complete examples at [./examples](https://github.com/pimalaya/io-calendar/blob/master/examples).*
2626

27-
### TODO
27+
### List calendars from CalDAV server (sync)
2828

2929
```rust,ignore
30-
// TODO
30+
use io_stream::runtimes::std::handle;
31+
use io_calendar::caldav::coroutines::{list_calendars::ListCalendars, send::SendResult};
32+
33+
let mut arg = None;
34+
let mut http = ListCalendars::new(&config);
35+
36+
let calendars = loop {
37+
match http.resume(arg.take()) {
38+
SendResult::Ok(res) => break res.body,
39+
SendResult::Err(err) => panic!("{err}"),
40+
SendResult::Io(io) => arg = Some(handle(&mut stream, io).unwrap()),
41+
}
42+
};
43+
44+
println!("calendars: {calendars:#?}");
3145
```
3246

3347
### More examples
3448

3549
Have a look at projects built on the top of this library:
3650

37-
- *TODO*
51+
- [Calendula](https://github.com/pimalaya/calendula): CLI to manage calendars.
3852

3953
## Sponsoring
4054

deny.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[sources]
2+
unknown-registry = "deny"
3+
unknown-git = "deny"
4+
5+
[licenses]
6+
allow = ["Apache-2.0", "BSD-3-Clause", "MIT", "Unicode-3.0"]
7+
8+
[licenses.private]
9+
ignore = true

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
description = "Set of I/O-free Rust coroutines to manage contacts";
2+
description = "Set of I/O-free Rust coroutines to manage calendars";
33

44
inputs = {
55
nixpkgs = {

shell.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
}:
55

66
pimalaya.mkShell {
7-
extraBuildInputs = "nixd,nixfmt-rfc-style,git-cliff";
7+
extraBuildInputs = "nixd,nixfmt-rfc-style,git-cliff,cargo-deny";
88
}

tests/std-vdir.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ use io_calendar::{
1717
},
1818
};
1919
use io_fs::runtimes::std::handle;
20-
use tempdir::TempDir;
20+
use tempfile::tempdir;
2121

2222
#[test]
2323
fn std_vdir() {
2424
env_logger::init();
2525

26-
let workdir = TempDir::new("test-vdir-std").unwrap();
26+
let workdir = tempdir().unwrap();
2727
let root = workdir.path();
2828

2929
// should list empty calendars

0 commit comments

Comments
 (0)