-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to Github Actions and prepare for 2.4 release (#13)
Merges PR #13
- Loading branch information
Showing
6 changed files
with
141 additions
and
34 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# This is the clippy workflow, seperate from the main 'Rust' workflow | ||
# | ||
# This is copied from slog-rs/slog | ||
# | ||
# TODO: Should clippy success be required or not? | ||
on: [push, pull_request] | ||
name: Clippy | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
# has a history of occasional bugs (especially on old versions) | ||
# | ||
# the ci is free so we might as well use it ;) | ||
CARGO_INCREMENTAL: 0 | ||
|
||
|
||
jobs: | ||
clippy: | ||
# Only run on PRs if the source branch is on someone else's repo | ||
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
components: clippy | ||
- shell: bash | ||
run: | | ||
cargo clippy |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# The file is the workflow for rustfmt | ||
# | ||
# It runs `cargo fmt --check` | ||
# | ||
# It will fail if there are formatting problems. | ||
# | ||
# Mostly copied from slog-rs/slog | ||
on: [push, pull_request] | ||
name: rustfmt | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
rustfmt: | ||
# Only run on PRs if the source branch is on someone else's repo | ||
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
rust: | ||
- stable | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
components: rustfmt | ||
- shell: bash | ||
run: | | ||
cargo fmt -- --check |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# We use `actions-rs` for most of our actions | ||
# | ||
# This file is for the main tests. clippy & rustfmt are seperate workflows | ||
# | ||
# This is mostly copied from slog-rs repo ;) | ||
on: [push, pull_request] | ||
name: Cargo Test | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
# has a history of occasional bugs (especially on old versions) | ||
# | ||
# the ci is free so we might as well use it ;) | ||
CARGO_INCREMENTAL: 0 | ||
|
||
|
||
# Tested versions: | ||
# 1. stable | ||
# 2. nightly | ||
# 3. Minimum Supported Rust Version (MSRV) | ||
|
||
jobs: | ||
test: | ||
# Only run on PRs if the source branch is on someone else's repo | ||
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false # Even if one job fails we still want to see the other ones | ||
matrix: | ||
# 1.53 is MSRV. Keep this in sync with Cargo.toml | ||
rust: [1.53, stable, nightly] | ||
# NOTE: We don't really have any "feature combos" to test. | ||
# | ||
# We just have default features and nothing else :) | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
# NOTE: This crate is simple enough we don't need seperate check/test actions | ||
- name: Test | ||
run: | | ||
cargo test --verbose |
This file was deleted.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "slog-bunyan" | ||
version = "2.3.0" | ||
version = "2.4.0" | ||
edition = "2018" | ||
authors = ["Dawid Ciężarkiewicz <[email protected]>"] | ||
description = "Bunyan formatter for slog-rs" | ||
|
@@ -11,11 +11,22 @@ homepage = "https://github.com/slog-rs/slog" | |
repository = "https://github.com/slog-rs/bunyan" | ||
readme = "README.md" | ||
|
||
# This is our Minimum Supported Rust Version (MSRV) | ||
# | ||
# Please do not bump this unnecessarily. | ||
# Changing this bumps the minor version for semver (2.x for semver). | ||
# | ||
# NOTE: Changing this requires updating github actions | ||
# | ||
# The first version of Cargo that supports this field was in Rust 1.56.0. | ||
# In older releases, the field will be ignored, and Cargo will display a warning. | ||
rust-version = "1.53" | ||
|
||
[lib] | ||
path = "lib.rs" | ||
|
||
[dependencies] | ||
slog = "2" | ||
slog-json = "2" | ||
slog-json = "2.6" | ||
hostname = "0.3.0" | ||
time = { version = "0.3.6", features = ["formatting", "local-offset", "macros"] } |