-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Remove separate CLI workspace and commit workspace lockfile - Update Rust-related actions in CI config - Check dependency graph with cargo-deny - Fix new clippy lints and let-else formatting - Replace `atty` crate (unmaintained) with `is-terminal`
- Loading branch information
Showing
20 changed files
with
666 additions
and
421 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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
# Do not send the `target` dirs to the Docker builder | ||
target | ||
cli/target |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
rust_version: | ||
type: string | ||
description: Rust version to use in the build | ||
required: false | ||
default: stable | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ inputs.rust_version }} | ||
components: rustfmt, clippy | ||
- name: Install cargo-deny | ||
uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: cargo-deny | ||
version: "^0.14" | ||
|
||
- name: Cache cargo build | ||
uses: actions/cache@v3 | ||
with: | ||
path: target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
restore-keys: ${{ runner.os }}-cargo | ||
|
||
- name: Format | ||
run: cargo fmt --all -- --check | ||
- name: Clippy | ||
run: cargo clippy --workspace --all-features --all-targets -- -D warnings | ||
- name: Clippy (no features) | ||
run: cargo clippy -p term-transcript --no-default-features --lib | ||
- name: Clippy (features = svg) | ||
run: cargo clippy -p term-transcript --no-default-features --features svg --lib -- -D warnings | ||
- name: Clippy (features = test) | ||
run: cargo clippy -p term-transcript --no-default-features --features test --lib -- -D warnings | ||
|
||
- name: Check dependencies | ||
run: cargo deny --workspace --all-features check | ||
|
||
- name: Run tests | ||
run: cargo test --workspace --all-features --all-targets | ||
- name: Run doc tests | ||
run: cargo test --workspace --all-features --doc | ||
|
||
- name: Generate snapshots | ||
run: ./examples/generate-snapshots.sh | ||
- name: Test CLI tracing | ||
run: | | ||
RUST_LOG=term_transcript=debug \ | ||
cargo run -p term-transcript-cli --all-features -- \ | ||
exec 'echo Hello' |& grep INFO |
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
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,9 @@ | ||
name: Scheduled checks | ||
|
||
on: | ||
schedule: | ||
- cron: "0 2 * * MON" | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build-reusable.yml |
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,5 @@ | ||
# Rust | ||
target | ||
/Cargo.lock | ||
|
||
# IDE | ||
.idea |
Oops, something went wrong.