mirror of
https://github.com/chipsenkbeil/distant.git
synced 2024-11-15 06:12:56 +00:00
16bed4690b
* Update distant-ssh2 with new changes to wezterm-ssh * Implement lua module (distant-lua) * Implement tests for lua module (distant-lua-tests) * Add untested windows daemon support * distant binary now compiles on windows * Split up Github actions for Windows, MacOS, and Linux into individual yaml files
73 lines
2.3 KiB
YAML
73 lines
2.3 KiB
YAML
name: CI (Linux)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
tests:
|
|
name: "Test Rust ${{ matrix.rust }} on ${{ matrix.os }}"
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { rust: stable, os: ubuntu-latest }
|
|
- { rust: 1.51.0, os: ubuntu-latest }
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install Rust ${{ matrix.rust }}
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: ${{ matrix.rust }}
|
|
- uses: Swatinem/rust-cache@v1
|
|
- name: Check Cargo availability
|
|
run: cargo --version
|
|
- uses: dorny/paths-filter@v2
|
|
id: changes
|
|
with:
|
|
base: ${{ github.ref }}
|
|
filters: |
|
|
cli:
|
|
- 'src/**'
|
|
- 'Cargo.*'
|
|
core:
|
|
- 'distant-core/**'
|
|
ssh2:
|
|
- 'distant-ssh2/**'
|
|
lua:
|
|
- 'distant-lua/**'
|
|
- 'distant-lua-tests/**'
|
|
- name: Run core tests (default features)
|
|
run: cargo test --verbose -p distant-core
|
|
if: steps.changes.outputs.core == 'true'
|
|
- name: Run core tests (all features)
|
|
run: cargo test --verbose --all-features -p distant-core
|
|
if: steps.changes.outputs.core == 'true'
|
|
- name: Ensure /run/sshd exists on Unix
|
|
run: mkdir -p /run/sshd
|
|
if: steps.changes.outputs.ssh2 == 'true'
|
|
- name: Run ssh2 tests (default features)
|
|
run: cargo test --verbose -p distant-ssh2
|
|
if: steps.changes.outputs.ssh2 == 'true'
|
|
- name: Run ssh2 tests (all features)
|
|
run: cargo test --verbose --all-features -p distant-ssh2
|
|
if: steps.changes.outputs.ssh2 == 'true'
|
|
- name: Run CLI tests
|
|
run: cargo test --verbose
|
|
shell: bash
|
|
if: steps.changes.outputs.cli == 'true'
|
|
- name: Run CLI tests (no default features)
|
|
run: cargo test --verbose --no-default-features
|
|
shell: bash
|
|
if: steps.changes.outputs.cli == 'true'
|
|
- name: Run Lua tests
|
|
run: (cd distant-lua && cargo build) && (cd distant-lua-tests && cargo test --verbose)
|
|
shell: bash
|
|
if: steps.changes.outputs.lua == 'true'
|