-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Filippo Costa <[email protected]>
- Loading branch information
0 parents
commit 42dddd6
Showing
6 changed files
with
828 additions
and
0 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,74 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: -D warnings | ||
|
||
jobs: | ||
check-aggregate: | ||
# Follows the guide at <https://github.com/re-actors/alls-green>. | ||
runs-on: ubuntu-latest | ||
if: always() | ||
needs: | ||
# If you're modifying this workflow file and you're adding/removing a job | ||
# which should be required to pass before merging a PR, don't forget to | ||
# update this list! | ||
- check | ||
- features | ||
- test | ||
steps: | ||
- name: Compute whether the needed jobs succeeded or failed | ||
uses: re-actors/alls-green@release/v1 | ||
with: | ||
allowed-skips: deploy-github-pages | ||
jobs: ${{ toJSON(needs) }} | ||
|
||
check: | ||
name: check | ||
runs-on: buildjet-4vcpu-ubuntu-2204 | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Rust | ||
run: rustup show | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Check formatting | ||
run: cargo fmt --all --check | ||
- run: cargo check --all-targets --all-features | ||
- run: cargo clippy --all-targets --all-features | ||
|
||
# Check that every combination of features is working properly. | ||
features: | ||
name: features | ||
runs-on: buildjet-8vcpu-ubuntu-2204 | ||
timeout-minutes: 120 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Rust | ||
run: rustup show | ||
- name: cargo install cargo-hack | ||
uses: taiki-e/install-action@cargo-hack | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: cargo hack | ||
run: cargo hack check --workspace --feature-powerset --all-targets | ||
test: | ||
name: test | ||
runs-on: buildjet-4vcpu-ubuntu-2204 | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: taiki-e/install-action@nextest | ||
- name: Install Rust | ||
run: rustup show | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: cargo nextest run --workspace --all-features | ||
# `cargo-nextest` does not support doctests (yet?), so we have to run them | ||
# separately. | ||
# TODO: https://github.com/nextest-rs/nextest/issues/16 | ||
- run: cargo test --workspace --doc --all-features |
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,13 @@ | ||
# From <https://github.com/github/gitignore/blob/main/Rust.gitignore>. | ||
# Cargo.lock is not .gitignore'd because the repository contains binaries. | ||
|
||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[package] | ||
name = "bashtestmd" | ||
version = "0.3.0" | ||
description = "Compiles shell commands in .md files into Bash scripts for testing" | ||
edition = "2021" | ||
authors = ["Sovereign Labs <[email protected]>"] | ||
repository = "https://github.com/sovereign-labs/bashtestmd" | ||
homepage = "https://www.sovereign.xyz" | ||
license = "MIT OR Apache-2.0" | ||
|
||
resolver = "2" | ||
autotests = false | ||
publish = true | ||
|
||
[dependencies] | ||
clap = { version = "4", features = ["derive"] } | ||
indoc = "2" | ||
markdown = "1.0.0-alpha.16" | ||
shell-escape = "0.1.5" |
Oops, something went wrong.