Skip to content

Commit

Permalink
Extract common rust CI infra into separate file
Browse files Browse the repository at this point in the history
Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
  • Loading branch information
wiktor-k committed Apr 5, 2024
1 parent 4051ee2 commit e54891e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 27 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Misc

on:
pull_request:
push:
tags:
- 'v*'
branches: [ main ]
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
integration:
name: Integration tests
# If starting the example fails at runtime the integration test will
# be stuck. Try to limit the damage. The value "10" selected arbitrarily.
timeout-minutes: 10
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
include:
- os: windows-latest
windows: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# 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
run: cargo check --example key_storage
- name: Run integration tests
run: ./tests/sign-and-verify.sh
if: ${{ ! matrix.windows }}
- name: Run integration tests
run: ".\\tests\\sign-and-verify-win.bat"
if: ${{ matrix.windows }}
27 changes: 1 addition & 26 deletions .github/workflows/ci.yml → .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: cargo install --locked just cargo-deny
- name: Run unit tests
- name: Run dependencies check
run: just dependencies

lints:
Expand All @@ -84,28 +84,3 @@ jobs:
- run: cargo install --locked just
- name: Check for lints
run: just lints

integration:
name: Integration tests
# If starting the example fails at runtime the integration test will
# be stuck. Try to limit the damage. The value "10" selected arbitrarily.
timeout-minutes: 10
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
include:
- os: windows-latest
windows: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# 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
run: cargo check --example key_storage
- name: Run integration tests
run: ./tests/sign-and-verify.sh
if: ${{ ! matrix.windows }}
- name: Run integration tests
run: ".\\tests\\sign-and-verify-win.bat"
if: ${{ matrix.windows }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ssh-agent-lib

[![CI](https://github.com/wiktor-k/ssh-agent-lib/actions/workflows/ci.yml/badge.svg)](https://github.com/wiktor-k/ssh-agent-lib/actions/workflows/ci.yml)
[![CI](https://github.com/wiktor-k/ssh-agent-lib/actions/workflows/rust.yml/badge.svg)](https://github.com/wiktor-k/ssh-agent-lib/actions/workflows/rust.yml)
[![Crates.io](https://img.shields.io/crates/v/ssh-agent-lib)](https://crates.io/crates/ssh-agent-lib)

A collection of types for writing custom SSH agents as specified by the [SSH Agent Protocol Internet Draft](https://datatracker.ietf.org/doc/html/draft-miller-ssh-agent).
Expand Down

0 comments on commit e54891e

Please sign in to comment.