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:
Casey Rodarmor 2020-01-25 19:58:32 -08:00 committed by GitHub
parent 5cb15532e8
commit e3ac2c61e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 4 deletions

View File

@ -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##*.}

View File

@ -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: "