Skip to content

Commit

Permalink
Add CI job to do cargo check for multiple feature combination
Browse files Browse the repository at this point in the history
  • Loading branch information
AS1100K committed Feb 6, 2025
1 parent 239e227 commit b9d6e3b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
26 changes: 12 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ on:
push:
branches: [main]
paths:
- '**.rs'
- '**.toml'
- "**.rs"
- "**.toml"
pull_request:
branches: [main]
paths:
- '**.rs'
- '**.toml'
- "**.rs"
- "**.toml"

env:
CARGO_TERM_COLOR: always

jobs:
# Currently there are no unit tests in this repository, so ignore this job
# While example are tested in `check-examples.yml`
#
#
# Run cargo test
# test:
# name: Test Suite
Expand All @@ -34,22 +34,20 @@ jobs:
# - name: Run cargo test
# run: cargo test --tests --features full

cargo_check:
name: Cargo Check
strategy:
matrix:
feature: [full, bot, http, rich_presence]
runs-on: ubuntu-latest
timeout-minutes: 30
cargo_combination_check:
name: Cargo Combination Check
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: rs-workspace/[email protected]
- name: Install Dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Run cargo test
run: cargo check --features ${{ matrix.feature }}
- name: Install cargo-feature-combinations
run: cargo install cargo-feature-combinations
- name: Run cargo fc check
run: cargo fc check

# Run cargo clippy
clippy_check:
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ async-trait = { version = "0.1", optional = true }
bevy = "0.15"
serde_json = "1"

[package.metadata.cargo-feature-combinations]
skip_feature_sets = [["bot", "docsrs"]]
denylist = ["default", "full", "bot_cache", "rich_presence_local_testing"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
Expand Down

0 comments on commit b9d6e3b

Please sign in to comment.