Skip to content

Commit

Permalink
Merge branch 'main' of github.com:xmtp/libxmtp into insipx/web-to-lib…
Browse files Browse the repository at this point in the history
…xmtp
  • Loading branch information
insipx committed Aug 13, 2024
2 parents dc3b588 + 44924a2 commit 7a07a7a
Show file tree
Hide file tree
Showing 52 changed files with 2,056 additions and 1,321 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/lint-workspace.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: Lint Workspace

on:
push:
branches:
- main

pull_request:
paths:
- ".github/workflows/lint.yaml"
- "mls_validation_service/**"
- "xmtp_api_grpc/**"
- "xmtp_api_http/**"
- "xmtp_cryptography/**"
- "xmtp_id/**"
- "xmtp_mls/**"
Expand All @@ -19,26 +18,21 @@ on:
- "Cargo.lock"
- "rust-toolchain"
- "rustfmt.toml"

jobs:
lint:
name: Lint
runs-on: warp-ubuntu-latest-x64-16x
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Update rust toolchains
run: rustup update

- name: Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- name: Run clippy and fail on warnings
run: cargo clippy --all-features --all-targets --no-deps -- -Dwarnings

- name: Run format check
run: cargo fmt --check
40 changes: 40 additions & 0 deletions .github/workflows/test-http-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test workspace with HTTP
on:
push:
branches:
- main
pull_request:
# only run tests when related changes are made
paths:
- ".github/workflows/test-workspace.yml"
- "dev/**"
- "mls_validation_service/**"
- "xmtp_api_http/**"
- "xmtp_cryptography/**"
- "xmtp_id/**"
- "xmtp_mls/**"
- "xmtp_proto/**"
- "xmtp_v2/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain"
jobs:
test:
name: Test
runs-on: warp-ubuntu-latest-x64-16x
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update rust toolchains
run: rustup update
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- name: Start Docker containers
run: dev/up
- name: Run cargo test on main workspace
run: cargo test --workspace --exclude xmtp_api_grpc --features http-api -- --test-threads=2
8 changes: 0 additions & 8 deletions .github/workflows/test-workspace.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Test Workspace

on:
push:
branches:
- main

pull_request:
# only run tests when related changes are made
paths:
Expand All @@ -20,29 +18,23 @@ on:
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain"

jobs:
test:
name: Test
runs-on: warp-ubuntu-latest-x64-16x
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Update rust toolchains
run: rustup update

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- name: Start Docker containers
run: dev/up

- name: Run cargo test on main workspace
run: cargo test -- --test-threads=2
37 changes: 16 additions & 21 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
{
"rust-analyzer": {
"cargo": {
"sysroot": "discover"
},
"linkedProjects": [
"bindings_ffi/Cargo.toml",
"bindings_node/Cargo.toml",
"examples/cli/Cargo.toml",
"xmtp_api_grpc_gateway/Cargo.toml"
],
"procMacro": {
"enable": true,
"attributes.enable": true,
"ignored": {
"async-trait": ["async_trait"],
"napi-derive": ["napi"],
"async-recursion": ["async_recursion"],
"ctor": ["ctor"],
"tokio": ["test"]
}
}
"rust-analyzer.cargo.sysroot": "discover",
"rust-analyzer.linkedProjects": [
"bindings_ffi/Cargo.toml",
"bindings_node/Cargo.toml",
"bindings_wasm/Cargo.toml",
"examples/cli/Cargo.toml"
],
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.procMacro.attributes.enable": true,
"rust-analyzer.procMacro.ignored": {
"async-trait": ["async_trait"],
"napi-derive": ["napi"],
"async-recursion": ["async_recursion"],
"ctor": ["ctor"],
"tokio": ["test"],
"async-stream": ["stream", "try_stream"]
},
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
Expand Down
Loading

0 comments on commit 7a07a7a

Please sign in to comment.