Skip to content

Commit

Permalink
chore: trace flaky tests on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuhvi committed Jul 30, 2024
1 parent 3b3f9f9 commit 944cbdd
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,30 @@ jobs:
components: rustfmt, clippy
override: true

- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-build-
- name: Check no default features
run: cargo check --no-default-features

Expand All @@ -33,8 +57,11 @@ jobs:
- name: Build
run: cargo build --release --workspace --all-features --verbose

- name: Run tests
run: cargo test --all-features --workspace --verbose
- name: Install Nextest
run: cargo install cargo-nextest

- name: Run tests with Nextest
run: RUST_BACKTRACE=1 cargo nextest run --all-features --workspace --verbose

- name: Run docs
run: cargo doc --workspace --all-features --no-deps --document-private-items --verbose
2 changes: 1 addition & 1 deletion pubky-homeserver/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async fn main() -> Result<()> {
.init();

let server = if args.testnet {
let testnet = Testnet::new(3);
let testnet = Testnet::new(10);

Homeserver::start(Config {
port: Some(15411),
Expand Down
2 changes: 1 addition & 1 deletion pubky/src/shared/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ mod tests {

#[tokio::test]
async fn basic_authn() {
let testnet = Testnet::new(3);
let testnet = Testnet::new(10);
let server = Homeserver::start_test(&testnet).await.unwrap();

let client = PubkyClient::test(&testnet);
Expand Down
2 changes: 1 addition & 1 deletion pubky/src/shared/pkarr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ mod tests {

#[tokio::test]
async fn resolve_homeserver() {
let testnet = Testnet::new(3);
let testnet = Testnet::new(10);
let server = Homeserver::start_test(&testnet).await.unwrap();

// Publish an intermediate controller of the homeserver
Expand Down
2 changes: 1 addition & 1 deletion pubky/src/shared/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ mod tests {

#[tokio::test]
async fn put_get_delete() {
let testnet = Testnet::new(3);
let testnet = Testnet::new(10);
let server = Homeserver::start_test(&testnet).await.unwrap();

let client = PubkyClient::test(&testnet);
Expand Down

0 comments on commit 944cbdd

Please sign in to comment.