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]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- macos-latest
|
||||||
|
- ubuntu-latest
|
||||||
|
- windows-latest
|
||||||
|
runs-on: ${{matrix.os}}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- name: Install
|
- name: Install
|
||||||
@ -19,13 +25,19 @@ jobs:
|
|||||||
rustup --version
|
rustup --version
|
||||||
cargo --version
|
cargo --version
|
||||||
cargo clippy --version
|
cargo clippy --version
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --all --verbose
|
||||||
|
- name: Test
|
||||||
|
run: cargo test --all --verbose
|
||||||
- name: Clippy
|
- name: Clippy
|
||||||
run: cargo clippy
|
run: cargo clippy --all
|
||||||
- name: Lint
|
- name: Lint
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
run: cargo run lint
|
run: cargo run lint
|
||||||
- name: Format
|
- name: Format
|
||||||
run: cargo fmt -- --check
|
run: cargo fmt --all -- --check
|
||||||
- name: Completion Scripts
|
- name: Completion Scripts
|
||||||
|
if: matrix.os != 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
for script in completions/*; do
|
for script in completions/*; do
|
||||||
shell=${script##*.}
|
shell=${script##*.}
|
||||||
|
@ -2266,6 +2266,7 @@ test! {
|
|||||||
shell: false,
|
shell: false,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(unix)]
|
||||||
test! {
|
test! {
|
||||||
name: set_shell,
|
name: set_shell,
|
||||||
justfile: "
|
justfile: "
|
||||||
@ -2283,6 +2284,24 @@ test! {
|
|||||||
shell: false,
|
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! {
|
test! {
|
||||||
name: dependency_argument_string,
|
name: dependency_argument_string,
|
||||||
justfile: "
|
justfile: "
|
||||||
|
Loading…
Reference in New Issue
Block a user