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
This commit is contained in:
parent
5cb15532e8
commit
e3ac2c61e5
20
.github/workflows/rust.yaml
vendored
20
.github/workflows/rust.yaml
vendored
@ -1,10 +1,16 @@
|
||||
name: Rust
|
||||
name: Main
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os:
|
||||
- macos-latest
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
runs-on: ${{matrix.os}}
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install
|
||||
@ -19,13 +25,19 @@ jobs:
|
||||
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
|
||||
run: cargo clippy --all
|
||||
- name: Lint
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: cargo run lint
|
||||
- name: Format
|
||||
run: cargo fmt -- --check
|
||||
run: cargo fmt --all -- --check
|
||||
- name: Completion Scripts
|
||||
if: matrix.os != 'windows-latest'
|
||||
run: |
|
||||
for script in completions/*; do
|
||||
shell=${script##*.}
|
||||
|
@ -2266,6 +2266,7 @@ test! {
|
||||
shell: false,
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
test! {
|
||||
name: set_shell,
|
||||
justfile: "
|
||||
@ -2283,6 +2284,24 @@ test! {
|
||||
shell: false,
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
test! {
|
||||
name: set_shell,
|
||||
justfile: "
|
||||
set shell := ['echo', '-n']
|
||||
|
||||
x := `bar`
|
||||
|
||||
foo:
|
||||
echo {{x}}
|
||||
echo foo
|
||||
",
|
||||
args: (),
|
||||
stdout: "-n echo -n bar\r\r\n-n echo foo\r\n",
|
||||
stderr: "echo -n bar\r\necho foo\n",
|
||||
shell: false,
|
||||
}
|
||||
|
||||
test! {
|
||||
name: dependency_argument_string,
|
||||
justfile: "
|
||||
|
Loading…
Reference in New Issue
Block a user