Skip to content

Commit

Permalink
Expand use of Github Actions (#580)
Browse files Browse the repository at this point in the history
- Run on macOS, Ubuntu, and Windows
- Build and test
- Only lint and check completion scripts on non-windows OSs
  • Loading branch information
casey authored Jan 26, 2020
1 parent 5cb1553 commit e3ac2c6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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##*.}
Expand Down
19 changes: 19 additions & 0 deletions tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2266,6 +2266,7 @@ test! {
shell: false,
}

#[cfg(unix)]
test! {
name: set_shell,
justfile: "
Expand All @@ -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: "
Expand Down

0 comments on commit e3ac2c6

Please sign in to comment.