slog-rs / slog

Structured, contextual, extensible, composable logging for Rust
https://slog.rs/
Apache License 2.0
1.58k stars 95 forks source link

Switch to github actions #295

Closed Techcable closed 2 years ago

Techcable commented 2 years ago

Started with the auto-generated "workflow" Github generated for me.

This will fix issue #294

Make sure to:

panicbit commented 2 years ago

Please make sure that there is a test run with --all-features too (should be failing ATM).

panicbit commented 2 years ago

A run without default features is probably also a good idea.

dpc commented 2 years ago

Having a config option matrix or something would be best. I'm always worried when people submit PRs that they will break some non-trivial combination, but I don't have time to test them all manually.

Techcable commented 2 years ago

@dpc

Having a config option matrix or something would be best. I'm always worried when people submit PRs that they will break some non-trivial combination, but I don't have time to test them all manually.

@panicbit

Please make sure that there is a test run with --all-features too (should be failing ATM).

Yes. I'm working on all of this. I'm basing it around rust-toolchain and what some other crates are doing 😉

Right now I'm planning to avoid using the Makefile and run cargo directly.

I'm also going to split cargo check, cargo test and cargo clippy run as independent jobs on three different versions: stable, nightly, and 1.27 (our MSRV).

I'm also planning to split between default features and --all-features.

For now, I think cargo check and cargo test will be required to succeed (with default features).

cargo clippy should always be optional (although we still want to run it).

Until we get things fixed, we need cargo test and cargo check with --all-features to be (temporarily) optional too.

Techcable commented 2 years ago

Okay so this mostly works, but it doesn't seem to understand that test failure is okay if using optional features (the features != "" test).

Also, it doesn't seem to understand that cargo fmt problems and cargo clippy problems are okay too.

I'll work on this more later today......

Techcable commented 2 years ago

Okay, this should be good to merge. The only actions that fail are tests with optional features.

Eventually (once we fix the current failures), you should make "Cargo Test" a required workflow in all-new PRs.

clippy & rustfmt are enabled as separate "workflows". Right now they only give warnings, they never "fail".

dpc commented 2 years ago

:heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: :heart: