Skip to content

Commit

Permalink
Run SSH agent clients as part of the CI
Browse files Browse the repository at this point in the history
Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
  • Loading branch information
wiktor-k committed Jun 13, 2024
1 parent 5853f4f commit e7c5847
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ jobs:
- run: just install-packages
# If the example doesn't compile the integration test will
# be stuck. Check for compilation issues earlier to abort the job
- name: Check if the example compiles
- name: Check if the key-storage example compiles
run: cargo check --example key-storage
- name: Check if the ssh-agent-client example compiles
run: cargo check --example ssh-agent-client
- name: Check if the ssh-agent-client-blocking example compiles
run: cargo check --example ssh-agent-client-blocking
- name: Run integration tests
run: ${{ matrix.script }}
7 changes: 7 additions & 0 deletions tests/sign-and-verify-win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ ssh-keygen -Y check-novalidate -n file -f agent.pub -s Cargo.toml.sig < Cargo.to
if %errorlevel% neq 0 exit /b %errorlevel%

rem del /F /Q Cargo.toml.sig id_rsa id_rsa.pub agent.pub

rem run the examples
cargo run --example ssh-client-agent
if %errorlevel% neq 0 exit /b %errorlevel%

cargo run --example ssh-client-agent-blocking
if %errorlevel% neq 0 exit /b %errorlevel%
6 changes: 5 additions & 1 deletion tests/sign-and-verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ else
# does not support RestrictDestination constraint (macos)
ssh-add -t 2 id_rsa
fi

# clean up the only leftover
rm -rf id_rsa id_rsa.pub id_rsa-cert.pub ca_user_key ca_user_key.pub

# run the examples
cargo run --example ssh-client-agent
cargo run --example ssh-client-agent-blocking

0 comments on commit e7c5847

Please sign in to comment.