From 95c7c0a33b803fa49979aa973de358b6929a71ed Mon Sep 17 00:00:00 2001 From: Alex Plotnick Date: Sat, 6 Dec 2025 14:10:04 -0700 Subject: [PATCH] Add GitHub test workflow --- .cargo/config.toml | 3 +++ .gitattributes | 1 + .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ Cargo.lock | 2 ++ Cargo.toml | 4 ++-- 5 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/test.yml diff --git a/.cargo/config.toml b/.cargo/config.toml index e65044f0..494d949e 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,5 @@ [alias] openapi = "run --package openapi --" + +[net] +git-fetch-with-cli = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..d7c03623 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +sush.json linguist-generated diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..6a2a637a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Test +on: [push] +jobs: + Test: + runs-on: ubuntu-22.04-8core + steps: + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: 1.91 + components: clippy,rustfmt + + - name: Configure Git + run: | + git config --global init.defaultBranch main && + git config --global url."https://${{ secrets.GIT_CREDENTIALS }}@github.com".insteadOf https://github.com + + - name: Checkout + uses: actions/checkout@v6 + + - name: Lint + run: | + cargo fmt -- --check && + cargo clippy -- --no-deps --deny warnings && + cargo clippy --tests -- --no-deps --deny warnings + + - name: Build + run: cargo build --locked + + - name: Test + run: cargo test && cargo test -- --ignored diff --git a/Cargo.lock b/Cargo.lock index f465da71..bd6c3ce6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2033,6 +2033,7 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "permission-slip-client" version = "1.1.0" +source = "git+https://github.com/oxidecomputer/permission-slip#b8dfbcba8cd5d159cfe0167142771d2e5acd73e7" dependencies = [ "anyhow", "base64 0.22.1", @@ -2064,6 +2065,7 @@ dependencies = [ [[package]] name = "permission-slip-common" version = "0.1.0" +source = "git+https://github.com/oxidecomputer/permission-slip#b8dfbcba8cd5d159cfe0167142771d2e5acd73e7" dependencies = [ "blake3", "clap", diff --git a/Cargo.toml b/Cargo.toml index 0bb7ba2e..814d39d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,8 +14,8 @@ ed25519-dalek = { version = "2", features = ["rand_core"] } libc = "0.2" p256 = { version = "0.13", features = ["ecdsa"] } pem-rfc7468 = { version = "0.7", features = ["std"] } -permission-slip-client = { path = "../permission-slip/client" } -permission-slip-common = { path = "../permission-slip/common" } +permission-slip-client = { git = "https://github.com/oxidecomputer/permission-slip" } +permission-slip-common = { git = "https://github.com/oxidecomputer/permission-slip" } progenitor = "0.11" rand_core = "0.6" reqwest = "0.12"