Skip to content

Commit

Permalink
Refactor local crate & update/clean dependencies (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
chipsenkbeil committed Jun 1, 2023
1 parent 40c265e commit e99329d
Show file tree
Hide file tree
Showing 51 changed files with 273 additions and 1,811 deletions.
73 changes: 13 additions & 60 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,12 @@ jobs:
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v2
with:
key: "ci-clippy-${{ matrix.os }}"
- name: Check Cargo availability
run: cargo --version
- name: distant-auth (all features)
run: cargo clippy -p distant-auth --all-targets --verbose --all-features
- name: distant-net (all features)
run: cargo clippy -p distant-net --all-targets --verbose --all-features
- name: distant-core (all features)
run: cargo clippy -p distant-core --all-targets --verbose --all-features
- name: distant-ssh2 (all features)
run: cargo clippy -p distant-ssh2 --all-targets --verbose --all-features
- name: distant (all features)
run: cargo clippy --all-targets --verbose --all-features
- name: Run clippy (all features)
run: cargo clippy --workspace --all-targets --verbose --all-features
rustfmt:
name: "Verify code formatting (${{ matrix.os }})"
runs-on: ${{ matrix.os }}
Expand All @@ -73,6 +67,8 @@ jobs:
toolchain: stable
components: rustfmt
- uses: Swatinem/rust-cache@v2
with:
key: "ci-rustfmt-${{ matrix.os }}"
- name: Check Cargo availability
run: cargo --version
- run: cargo fmt --all -- --check
Expand Down Expand Up @@ -102,6 +98,8 @@ jobs:
with:
tool: cargo-nextest@0.9.45
- uses: Swatinem/rust-cache@v2
with:
key: "ci-tests-${{ matrix.os }}-${{ matrix.rust }}-${{ matrix.target }}"
- name: Check Cargo availability
run: cargo --version
- uses: nick-fields/retry@v2
Expand Down Expand Up @@ -157,58 +155,13 @@ jobs:
New-ItemProperty -Path $registryPath -Name $name -Value $value -PropertyType String -Force
}
- name: Extend Windows retry count to be more resilient
if: matrix.os == 'windows-latest'
run: echo "NEXTEST_RETRIES=9" >> $GITHUB_ENV
shell: bash
- name: Run auth tests (all features)
run: cargo nextest run --profile ci --release --all-features -p distant-auth
- name: Run net tests (default features)
run: cargo nextest run --profile ci --release -p distant-net
- name: Build core (default features)
run: cargo build --release -p distant-core
- name: Run core tests (all features)
run: cargo nextest run --profile ci --release --all-features -p distant-core
if: matrix.os == 'windows-latest'
- name: Ensure /run/sshd exists on Unix
run: mkdir -p /run/sshd
if: matrix.os == 'ubuntu-latest'
- name: Build ssh2 (default features)
run: cargo build --release -p distant-ssh2
- name: Run ssh2 client tests (all features)
run: cargo nextest run --profile ci --release --all-features -p distant-ssh2 ssh2::client
- name: Build CLI (no default features)
run: cargo build --release --no-default-features
- name: Build CLI (default features)
run: cargo build --release
- name: Run CLI tests (all features)
run: cargo nextest run --profile ci --release --all-features
ssh-launch-tests:
name: "Test ssh launch using Rust ${{ matrix.rust }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
env:
RUSTFLAGS: --cfg ci
RUST_LOG: trace
strategy:
fail-fast: false
matrix:
include:
- { rust: stable, os: macos-latest }
- { rust: stable, os: ubuntu-latest }
steps:
- uses: actions/checkout@v3
- name: Install Rust ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
- uses: taiki-e/install-action@v1
with:
tool: cargo-nextest@0.9.45
- uses: Swatinem/rust-cache@v2
- name: Check Cargo availability
run: cargo --version
- name: Install distant cli for use in launch tests
run: |
cargo install --path .
echo "DISTANT_PATH=$HOME/.cargo/bin/distant" >> $GITHUB_ENV
- name: Run ssh2 launch tests (all features)
run: cargo nextest run --profile ci --release --all-features -p distant-ssh2 ssh2::launched
- name: Run all workspace tests (all features)
run: cargo nextest run --profile ci --release --all-features --workspace
- name: Run all doc tests (all features)
run: cargo test --release --all-features --workspace --doc
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Capabilities` message type has been changed to `Version` with new struct to
report the version information that includes a server version string,
protocol version tuple, and capabilities
- `distant_core::api::local` moved to `distant_local`

### Removed

Expand Down
Loading

0 comments on commit e99329d

Please sign in to comment.