diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 16375d0..1e70589 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,125 +16,48 @@ env: TOOLCHAIN_PROFILE: minimal jobs: - lint-vaultrs: - name: Run cargo fmt and cargo clippy for vaultrs + fmt: runs-on: ubuntu-latest + name: stable / fmt steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: ${{ env.TOOLCHAIN_PROFILE }} - toolchain: ${{ env.RUST_TOOLCHAIN }} - override: true - components: rustfmt, clippy - - name: Use cache - uses: Swatinem/rust-cache@v1 - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check - - name: Run cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: -- -D warnings - lint-vaultrs-login: - name: Run cargo fmt and cargo clippy for vaultrs-login - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: ${{ env.TOOLCHAIN_PROFILE }} - toolchain: ${{ env.RUST_TOOLCHAIN }} - override: true - components: rustfmt, clippy - - name: Use cache - uses: Swatinem/rust-cache@v1 - with: - working-directory: vaultrs-login/ - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all --package vaultr-login -- --check - - name: Run cargo clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --package vaultrs-login -- -D warnings - test-vaultrs: - name: Run cargo test for vaultrs + - uses: actions/checkout@v4 + - name: Install stable + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - name: cargo fmt + run: cargo fmt --check + clippy: runs-on: ubuntu-latest + name: stable / clippy steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: ${{ env.TOOLCHAIN_PROFILE }} - toolchain: ${{ env.RUST_TOOLCHAIN }} - override: true - - name: Use cache - uses: Swatinem/rust-cache@v1 - - name: Run cargo test with -no-run (compile tests) - uses: actions-rs/cargo@v1 - with: - command: test - args: --no-run - - name: Run cargo test --all-features - uses: actions-rs/cargo@v1 - env: - RUST_TEST_THREADS: 1 - with: - command: test - args: --all-features - - name: Run cargo test - uses: actions-rs/cargo@v1 - env: - RUST_TEST_THREADS: 1 - with: - command: test - test-vaultrs-login: - name: Run cargo test for vaultrs-login + - uses: actions/checkout@v4 + - name: Install stable + uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - name: cargo clippy + run: cargo clippy --all-targets --all-features --workspace -- -D warnings + test: runs-on: ubuntu-latest + name: stable / test steps: - - name: Checkout sources - uses: actions/checkout@v2 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: ${{ env.TOOLCHAIN_PROFILE }} - toolchain: ${{ env.RUST_TOOLCHAIN }} - override: true - - name: Use cache - uses: Swatinem/rust-cache@v1 - with: - working-directory: vaultrs-login/ - - name: Run cargo test with -no-run (compile tests) - uses: actions-rs/cargo@v1 - with: - command: test - args: --package vaultrs-login --all-features --no-run - - name: Run cargo test - uses: actions-rs/cargo@v1 - env: - RUST_TEST_THREADS: 1 - with: - command: test - args: --package vaultrs-login --all-features + - uses: actions/checkout@v4 + - name: Install stable + uses: dtolnay/rust-toolchain@stable + - name: cargo test + run: cargo test --all-targets --all-features --workspace + # https://github.com/rust-lang/cargo/issues/6669 + - name: cargo test --doc + run: cargo test --all-features --workspace --doc + publish: name: Publish to crates.io runs-on: ubuntu-latest if: startsWith(github.event.ref, 'refs/tags/v') - needs: [lint-vaultrs, lint-vaultrs-login, test-vaultrs, test-vaultrs-login] + needs: [fmt, clippy, test] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: profile: ${{ env.TOOLCHAIN_PROFILE }} diff --git a/typos.toml b/typos.toml index bb2b054..9eacbbe 100644 --- a/typos.toml +++ b/typos.toml @@ -2,4 +2,4 @@ hashi = "hashi" [files] -extend-exclude = ["tests/files/*"] \ No newline at end of file +extend-exclude = ["vaultrs-tests/tests/files/*"]