mirror of
https://github.com/watchexec/watchexec.git
synced 2024-09-05 11:01:32 +02:00
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
name: Test suite
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags-ignore:
|
|
- "*"
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- macos
|
|
- ubuntu
|
|
- windows
|
|
toolchain:
|
|
- stable
|
|
- 1.60.0
|
|
|
|
name: Test ${{ matrix.platform }} with Rust ${{ matrix.toolchain }}
|
|
runs-on: "${{ matrix.platform }}-latest"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Configure toolchain
|
|
run: |
|
|
rustup toolchain install --profile minimal --no-self-update ${{ matrix.toolchain }}
|
|
rustup default ${{ matrix.toolchain }}
|
|
|
|
# https://github.com/actions/cache/issues/752
|
|
- if: ${{ runner.os == 'Windows' }}
|
|
name: Use GNU tar
|
|
shell: cmd
|
|
run: |
|
|
echo "Adding GNU tar to PATH"
|
|
echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
|
|
|
|
- name: Configure caching
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-${{ matrix.toolchain }}-
|
|
${{ runner.os }}-cargo-
|
|
|
|
- name: Run test suite
|
|
run: cargo test
|
|
- name: Check that CLI runs
|
|
run: cargo run -p watchexec-cli -- -1 echo
|