Skip to content

Commit

Permalink
Merge pull request #94 from mitsuhiko/remove-travis
Browse files Browse the repository at this point in the history
Move more to github ci
  • Loading branch information
pksunkara committed Nov 6, 2020
2 parents 2300982 + fe41c31 commit 8cebf52
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 20 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: CI
on:
push:
branches: [staging, trying]
pull_request:
branches: [master]
types: [opened, reopened, synchronize]
jobs:
test:
name: Tests
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
target: x86_64-apple-darwin
rust: 1.40.0
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
rust: 1.40.0
- os: ubuntu-latest
target: i686-unknown-linux-gnu
rust: 1.40.0
- os: windows-latest
target: i686-pc-windows-msvc
rust: 1.40.0
- os: windows-latest
target: x86_64-pc-windows-msvc
rust: 1.40.0
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
rust: stable
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
rust: beta
runs-on: ${{ matrix.os }}
steps:
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Install linker
if: matrix.target == 'i686-unknown-linux-gnu'
run: sudo apt-get install gcc-5-multilib lib32gcc-5-dev
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --target ${{ matrix.target }} --lib
nightly:
name: Nightly Tests
runs-on: ubuntu-latest
steps:
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --lib
lint:
name: Linting (fmt + clippy)
runs-on: ubuntu-latest
steps:
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Checkout
uses: actions/checkout@v2
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- name: Format check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,4 @@ readme = "README.md"
console = "0.13.0"
lazy_static = "1"
tempfile = "3"
# `zeroize` of version "0.9.3" is used because it doesn't
# depend on `alloc` crate which is unstable for rustc 1.32.0
# which is currently the minimum supported version for `dialoguer`.
zeroize = { version = "0.9.3", default-features = false, features = ["std"] }
zeroize = "1.1.1"
4 changes: 1 addition & 3 deletions src/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use std::{
/// ## Example
///
/// ```rust,no_run
/// # fn test() -> Result<(), Box<std::error::Error>> {
/// use dialoguer::Editor;
///
/// if let Some(rv) = Editor::new().edit("Enter a commit message").unwrap() {
Expand All @@ -20,7 +19,6 @@ use std::{
/// } else {
/// println!("Abort!");
/// }
/// # Ok(()) } fn main() { test().unwrap(); }
/// ```
pub struct Editor {
editor: OsString,
Expand Down Expand Up @@ -101,7 +99,7 @@ impl Editor {
let ts = fs::metadata(f.path())?.modified()?;

let s: String = self.editor.clone().into_string().unwrap();
let mut iterator = s.split(" ");
let mut iterator = s.split(' ');
let cmd = iterator.next().unwrap();
let args: Vec<&str> = iterator.collect();

Expand Down
2 changes: 1 addition & 1 deletion src/prompts/confirm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,6 @@ impl<'a> Confirm<'a> {
term.show_cursor()?;
term.flush()?;

return Ok(rv);
Ok(rv)
}
}
2 changes: 2 additions & 0 deletions src/prompts/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::needless_doctest_main)]

pub mod confirm;
pub mod input;
pub mod multi_select;
Expand Down

0 comments on commit 8cebf52

Please sign in to comment.