Skip to content

Commit

Permalink
Add workflow for checking feature powerset (#85)
Browse files Browse the repository at this point in the history
Adds a workflow with manual workflow_dispatch for checking all the
feature-powersets of our crates. We'll eventually want to run this on a
cadence but for testing purposes it's nice to only expose a manual
dispatch for now.
  • Loading branch information
Hinton authored Dec 17, 2024
1 parent d43b981 commit fe2b4f3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/check-powerset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Check Rust feature-powerset

on:
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Building for ${{ matrix.os }}

runs-on: ${{ matrix.os || 'ubuntu-24.04' }}

strategy:
fail-fast: false
matrix:
os:
- macos-14
- ubuntu-24.04
- windows-2022

steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Install rust
uses: dtolnay/rust-toolchain@315e265cd78dad1e1dcf3a5074f6d6c47029d5aa # stable
with:
toolchain: stable

- name: Cache cargo registry
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5

- name: Install cargo-hack
run: cargo install cargo-hack --version 0.6.33 --locked

- name: Build
run: cargo hack check --workspace --feature-powerset --no-dev-deps
env:
RUSTFLAGS: "-D warnings"
2 changes: 0 additions & 2 deletions crates/bitwarden-core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use reqwest::StatusCode;
use thiserror::Error;
use validator::ValidationErrors;

#[cfg(feature = "internal")]
use crate::client::encryption_settings::EncryptionSettingsError;

#[bitwarden_error(flat, export_as = "CoreError")]
Expand Down Expand Up @@ -62,7 +61,6 @@ pub enum Error {
#[error("Internal error: {0}")]
Internal(Cow<'static, str>),

#[cfg(feature = "internal")]
#[error(transparent)]
EncryptionSettings(#[from] EncryptionSettingsError),
}
Expand Down
4 changes: 2 additions & 2 deletions crates/bitwarden-error-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license-file.workspace = true
keywords.workspace = true

[features]
wasm = ["bitwarden-error/wasm"]
wasm = []

[dependencies]
darling = "0.20.10"
Expand All @@ -25,7 +25,7 @@ workspace = true
proc-macro = true

[dev-dependencies]
bitwarden-error.workspace = true
bitwarden-error = { workspace = true, features = ["wasm"] }
js-sys.workspace = true
serde.workspace = true
thiserror.workspace = true
Expand Down

0 comments on commit fe2b4f3

Please sign in to comment.