From ae6169c7bc7493484fac28aa3e044284bdfa12c4 Mon Sep 17 00:00:00 2001 From: Stefan Ruzitschka Date: Sat, 26 Jan 2019 00:42:52 +0100 Subject: [PATCH] [doc][test] add 'args' to usage and add integration test --- .github/main.workflow | 9 +++++++++ .gitignore | 3 +++ README.md | 1 + integration-test/Cargo.lock | 4 ++++ integration-test/Cargo.toml | 7 +++++++ integration-test/src/lib.rs | 7 +++++++ 6 files changed, 31 insertions(+) create mode 100644 .github/main.workflow create mode 100644 integration-test/Cargo.lock create mode 100644 integration-test/Cargo.toml create mode 100644 integration-test/src/lib.rs diff --git a/.github/main.workflow b/.github/main.workflow new file mode 100644 index 0000000..d9c4a50 --- /dev/null +++ b/.github/main.workflow @@ -0,0 +1,9 @@ +workflow "Integration tests" { + on = "push" + resolves = ["Quickstart"] +} + +action "Quickstart" { + uses = "icepuma/rust-action@master" + args = "cd integration-test && cargo fmt -- --check && cargo clippy -- -Dwarnings && cargo test" +} diff --git a/.gitignore b/.gitignore index 45884c4..39d9c89 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ /.idea *.iml + +**/target +**/*.rs.bk diff --git a/README.md b/README.md index 3af1eeb..03cc547 100644 --- a/README.md +++ b/README.md @@ -19,5 +19,6 @@ workflow "Quickstart" { action "Quickstart" { uses = "icepuma/rust-github-action@master" + args = "cargo fmt -- --check && cargo clippy -- -Dwarnings && cargo test" } ``` diff --git a/integration-test/Cargo.lock b/integration-test/Cargo.lock new file mode 100644 index 0000000..8c7c8f5 --- /dev/null +++ b/integration-test/Cargo.lock @@ -0,0 +1,4 @@ +[[package]] +name = "rust-action" +version = "0.1.0" + diff --git a/integration-test/Cargo.toml b/integration-test/Cargo.toml new file mode 100644 index 0000000..71ab33d --- /dev/null +++ b/integration-test/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "rust-action" +version = "0.1.0" +authors = ["Stefan Ruzitschka "] +edition = "2018" + +[dependencies] diff --git a/integration-test/src/lib.rs b/integration-test/src/lib.rs new file mode 100644 index 0000000..31e1bb2 --- /dev/null +++ b/integration-test/src/lib.rs @@ -0,0 +1,7 @@ +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } +}