From 8e93b9ebb4c40c458fd3161112ddfeaa3a91e8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Vis=C3=A9e?= Date: Mon, 4 Jun 2018 23:06:12 +0000 Subject: [PATCH] Start implementing GitLab CI --- .gitlab-ci.yml | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 4 ++-- README.md | 2 +- 3 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..aa81eee --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,60 @@ +image: "rust:slim" + +stages: + - check + - test + - integration + - release + +variables: + RUST_VERSION: stable + +# Cargo artifacts caching per Rust version +cache: + key: "$RUST_VERSION" + paths: + - /usr/local/rustup/ + - /usr/local/cargo/ + - target/ + +# Install compiler and OpenSSL dependencies +before_script: + - apt-get update -y + - apt-get install -y --no-install-recommends build-essential pkg-config libssl-dev + - rustup install $RUST_VERSION && rustup default $RUST_VERSION + - rustc --version && cargo --version + +# Check on stable, beta and nightly +.check-base: &check-base + stage: check + script: + - cargo check --all --verbose + - cargo check --no-default-features --all --verbose + - cargo check --features no-color --all --verbose +check-stable: + <<: *check-base + variables: + RUST_VERSION: stable +check-beta: + <<: *check-base + variables: + RUST_VERSION: beta +check-nightly: + <<: *check-base + variables: + RUST_VERSION: nightly + +# Run unit tests +test-unit: + stage: test + script: + - cargo test --all --verbose + +# Run integration test with the public Send service +integration-send: + stage: integration + script: + - cargo build + - head -c 1M testfile + - cargo run -- upload testfile -n testfile.bin -a -d 10 -p secret -I + # TODO: download this file, compare checksums diff --git a/Cargo.toml b/Cargo.toml index 294584d..0750467 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,8 +4,8 @@ version = "0.0.7" authors = ["Tim Visee "] license = "GPL-3.0" readme = "README.md" -homepage = "https://github.com/timvisee/ffsend" -repository = "https://github.com/timvisee/ffsend" +homepage = "https://gitlab.com/timvisee/ffsend" +repository = "https://gitlab.com/timvisee/ffsend" description = """\ Easily and securely share files from the command line.\n\ A fully featured Firefox Send client.\ diff --git a/README.md b/README.md index fa487ff..8876ad4 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Files are shared using the [Send][send] service and may be up to 2GB. Others are able to download these files with this tool, or through their webbrowser. -[![ffsend usage demo][usage-demo-svg]][usage-demo-asciinema] +[![ffsend usage demo][usage-demo-svg]][usage-demo-asciinema] _No demo visible here? View it on [asciinema][usage-demo-asciinema]._ All files are always encrypted on the client, and secrets are never shared with