just/.github/workflows/rust.yaml
Casey Rodarmor e3ac2c61e5
Expand use of Github Actions (#580)
- Run on macOS, Ubuntu, and Windows
- Build and test
- Only lint and check completion scripts on non-windows OSs
2020-01-25 19:58:32 -08:00

47 lines
1.1 KiB
YAML

name: Main
on: [push]
jobs:
build:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v1
- name: Install
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy, rustfmt
override: true
- name: Version
run: |
rustup --version
cargo --version
cargo clippy --version
- name: Build
run: cargo build --all --verbose
- name: Test
run: cargo test --all --verbose
- name: Clippy
run: cargo clippy --all
- name: Lint
if: matrix.os != 'windows-latest'
run: cargo run lint
- name: Format
run: cargo fmt --all -- --check
- name: Completion Scripts
if: matrix.os != 'windows-latest'
run: |
for script in completions/*; do
shell=${script##*.}
cargo run -- --completions $shell > $script
done
git diff --no-ext-diff --quiet --exit-code