forked from kemitix/git-next
build: test all feature combinations
This commit is contained in:
parent
08d2377404
commit
0632225752
4 changed files with 13 additions and 11 deletions
|
@ -18,21 +18,21 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Format
|
- name: Format
|
||||||
uses: https://git.kemitix.net/kemitix/rust@v1.80.0-2
|
uses: https://git.kemitix.net/kemitix/rust@v1.80.1-1
|
||||||
with:
|
with:
|
||||||
args: cargo fmt --all -- --check
|
args: cargo fmt --all -- --check
|
||||||
|
|
||||||
- name: Clippy
|
- name: Clippy
|
||||||
uses: https://git.kemitix.net/kemitix/rust@v1.80.0-2
|
uses: https://git.kemitix.net/kemitix/rust@v1.80.1-1
|
||||||
with:
|
with:
|
||||||
args: cargo clippy
|
args: cargo hack --feature-powerset clippy
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
uses: https://git.kemitix.net/kemitix/rust@v1.80.0-2
|
uses: https://git.kemitix.net/kemitix/rust@v1.80.1-1
|
||||||
with:
|
with:
|
||||||
args: cargo build
|
args: cargo hack --feature-powerset build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
uses: https://git.kemitix.net/kemitix/rust@v1.80.0-2
|
uses: https://git.kemitix.net/kemitix/rust@v1.80.1-1
|
||||||
with:
|
with:
|
||||||
args: cargo test
|
args: cargo hack --feature-powerset test
|
||||||
|
|
|
@ -22,7 +22,7 @@ impl Forge {
|
||||||
ForgeType::ForgeJo => Box::new(ForgeJo::new(repo_details, net)),
|
ForgeType::ForgeJo => Box::new(ForgeJo::new(repo_details, net)),
|
||||||
#[cfg(feature = "github")]
|
#[cfg(feature = "github")]
|
||||||
ForgeType::GitHub => Box::new(Github::new(repo_details, net)),
|
ForgeType::GitHub => Box::new(Github::new(repo_details, net)),
|
||||||
ForgeType::MockForge => unreachable!(),
|
_ => unreachable!(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ use git_next_core::{
|
||||||
GitDir, RepoConfigSource, StoragePathType,
|
GitDir, RepoConfigSource, StoragePathType,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#[cfg(feature = "forgejo")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_forgejo_name() {
|
fn test_forgejo_name() {
|
||||||
let net = Network::new_mock();
|
let net = Network::new_mock();
|
||||||
|
@ -15,6 +16,7 @@ fn test_forgejo_name() {
|
||||||
assert_eq!(forge.name(), "forgejo");
|
assert_eq!(forge.name(), "forgejo");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "github")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_github_name() {
|
fn test_github_name() {
|
||||||
let net = Network::new_mock();
|
let net = Network::new_mock();
|
||||||
|
|
6
justfile
6
justfile
|
@ -8,9 +8,9 @@ validate-dev-branch:
|
||||||
|
|
||||||
mock-ci:
|
mock-ci:
|
||||||
cargo fmt --check
|
cargo fmt --check
|
||||||
cargo build
|
cargo hack --feature-powerset build
|
||||||
cargo test
|
cargo hack --feature-powerset test
|
||||||
cargo clippy
|
cargo hack --feature-powerset clippy
|
||||||
|
|
||||||
start-ngrok:
|
start-ngrok:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
Loading…
Reference in a new issue