diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..18d9d5e --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,26 @@ +name: Build and Test + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + codestyle: + name: Codestyle + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + - uses: Swatinem/rust-cache@v2 + - run: cargo check + env: + RUSTFLAGS: '-D unused' + - run: cargo clippy -- -D clippy::all + - run: cargo fmt --check diff --git a/src/main.rs b/src/main.rs index de1bebc..998ca4c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use anyhow::{Ok, Result}; use base64::prelude::*; -use clap::{ArgAction, Parser, Subcommand}; +use clap::{Parser, Subcommand}; use humantime::Duration; use pasetors::{ claims::Claims, @@ -9,7 +9,6 @@ use pasetors::{ version4::V4, }; use std::io::{self, Read}; -use std::str::FromStr; use thiserror::Error; #[derive(Error, Debug)]