Skip to content

Merge pull request #10 from jacek-kurlit/main #199

Merge pull request #10 from jacek-kurlit/main

Merge pull request #10 from jacek-kurlit/main #199

Workflow file for this run

name: CI
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
env:
CARGO_TERM_COLOR: always
# Linters inspired from here: https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
jobs:
rust:
name: ${{ matrix.os }}-latest
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu
- os: macos
- os: windows
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
# - name: Launch sshd (Linux)
# if: matrix.os == 'ubuntu'
# run: sudo systemctl start ssh
#
# - name: Launch sshd (macOS)
# if: matrix.os == 'macos'
# run: sudo systemsetup -setremotelogin on
#
# - name: Launch sshd (Windows)
# if: matrix.os == 'windows'
# run: |
# Get-Service -Name ssh-agent | Set-Service -StartupType Manual
# Start-Service ssh-agent
- name: fmt
run: cargo fmt --all -- --check
- name: build
run: cargo build --verbose
- name: clippy
run: cargo clippy -- -D warnings
- name: test (macOS)
if: matrix.os == 'macos'
run: sudo cargo test --verbose -- --nocapture
- name: test (Linux & Windows)
if: matrix.os == 'ubuntu' || matrix.os == 'windows'
run: cargo test --verbose -- --nocapture