Compare commits

..

No commits in common. "9596694941a29c2423826c0f73f745411b9c89cd" and "5ba61ba02642b6532c275143a591182fb1d2f96b" have entirely different histories.

5 changed files with 0 additions and 60 deletions

View File

@ -1,17 +0,0 @@
kind: pipeline
type: docker
name: default
steps:
- name: build
image: rust
environment:
SECRET_INPUT:
from_secret: secret_input
commands:
- cargo build --verbose --all
- cargo test --verbose --all
# Simple test
- 'echo "Input: $SECRET_INPUT"'
- cargo run $SECRET_INPUT > output
- 'echo "Output: " && cat output'

5
.gitignore vendored
View File

@ -11,8 +11,3 @@ Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
#Added by cargo
/target

View File

@ -1,9 +0,0 @@
[package]
name = "ci-test"
version = "0.1.0"
authors = ["KAAAsS <admin@kaaass.net>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View File

@ -1,18 +0,0 @@
pub fn reverse(s : &str) -> String {
s.chars().rev().collect()
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_reverse() {
let query = "hello";
assert_eq!(
"olleh",
reverse(query)
);
}
}

View File

@ -1,11 +0,0 @@
use std::env;
use ci_test::reverse;
fn main() {
// Read from argument
let args: Vec<String> = env::args().collect();
if args.len() < 2 {
panic!("argument invalid");
}
println!("{}", reverse(&args[1]));
}