Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4

- name: Log in to GHCR
uses: docker/login-action@v3
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push ws-echo image
uses: docker/build-push-action@v6
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6
with:
context: .
file: Dockerfile.ws-echo
Expand Down
89 changes: 43 additions & 46 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,94 +2,89 @@ name: Rust

on:
push:
branches: [ "main" ]
branches: [ "master" ]
pull_request:
branches: [ "main" ]
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always

jobs:
build-test-all-features:
test:
runs-on: ubicloud-standard-8
permissions:
contents: write
pull-requests: write
actions: read
checks: write
repository-projects: write
contents: read

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4

- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
cache-on-failure: "true"

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
with:
toolchain: stable
profile: minimal
override: true
toolchain: stable

- name: Install cargo-all-features
run: cargo install cargo-all-features

- name: Run tests for all feature combinations
# This command builds/tests all combinations sequentially
run: cargo all-features test -- --verbose
- name: Test supported feature boundaries
run: |
cargo test --no-default-features
cargo test
cargo test --no-default-features --features agent-control
cargo test --no-default-features --features ws-client
cargo test --no-default-features --features ws
cargo test --no-default-features --features full
cargo test --all-features


clippy_check:

runs-on: ubicloud-standard-8
permissions:
contents: write
pull-requests: write
actions: read
checks: write
repository-projects: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4

- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
cache-on-failure: "true"

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
with:
toolchain: stable
profile: minimal
components: clippy
override: true
- name: Install cargo-all-features
run: cargo install cargo-all-features

- name: Clippy check all feature combinations
run: cargo all-features clippy --all-targets -- -D warnings
toolchain: stable
components: clippy
- name: Lint supported feature boundaries
run: |
cargo clippy --all-targets --no-default-features -- -D warnings
cargo clippy --all-targets -- -D warnings
cargo clippy --all-targets --no-default-features --features agent-control -- -D warnings
cargo clippy --all-targets --no-default-features --features ws-client -- -D warnings
cargo clippy --all-targets --no-default-features --features ws -- -D warnings
cargo clippy --all-targets --no-default-features --features full -- -D warnings
cargo clippy --all-targets --all-features -- -D warnings

format_check:

runs-on: ubicloud-standard-8
permissions:
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4

- uses: Swatinem/rust-cache@v2
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
cache-on-failure: "true"

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
with:
toolchain: stable
profile: minimal
components: rustfmt
override: true
toolchain: stable
components: rustfmt

- name: Check formatting
run: cargo fmt --all -- --check
Expand All @@ -103,7 +98,9 @@ jobs:
# and the job errors even when no vulnerabilities are found.
checks: write
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v2
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Resolve current compatible dependencies for audit
run: cargo generate-lockfile
- uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/target
Cargo.lock
.vscode/settings.json
node_modules/
examples/ws-echo/target/
Expand Down
Loading
Loading