diff --git a/.git-hooks/pre_push/cargo_test.rb b/.git-hooks/pre_push/cargo_test.rb deleted file mode 100644 index 3ee71be..0000000 --- a/.git-hooks/pre_push/cargo_test.rb +++ /dev/null @@ -1,13 +0,0 @@ -module Overcommit::Hook::PrePush - # Runs `cargo test` before push - # - class CargoTest < Base - def run - result = execute(command) - return :pass if result.success? - - output = result.stdout + result.stderr - [:fail, output] - end - end -end diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index eb4e734..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,99 +0,0 @@ -image: "debian:stretch-slim" - -stages: - - prepare - - build - - publish - -variables: - RUSTUP_HOME: "$CI_PROJECT_DIR/.rustup" - CARGO_HOME: "$CI_PROJECT_DIR/.cargo" - -.write_cache: - cache: - key: "$CI_COMMIT_REF_SLUG-rustup" - paths: - - .rustup - - .cargo - -.read_cache: - cache: - key: "$CI_COMMIT_REF_SLUG-rustup" - paths: - - .rustup - - .cargo - policy: pull - -.toolchain-stable: - extends: .read_cache - before_script: - - apt-get update - - apt-get install -y --no-install-recommends ca-certificates libssl-dev libc6-dev pkg-config gcc - - export PATH="$CARGO_HOME/bin:$PATH" - - rustup default stable - -.toolchain-nightly: - extends: .read_cache - allow_failure: true - before_script: - - apt-get update - - apt-get install -y --no-install-recommends ca-certificates libssl-dev libc6-dev pkg-config gcc - - export PATH="$CARGO_HOME/bin:$PATH" - - rustup default nightly - -.build-only-when-changes: &build-only-when-changes - only: - changes: - - Cargo.toml - - Cargo.lock - - src/**/*.rs - -####### Jobs ####### - -install-rust: - extends: .write_cache - stage: prepare - script: - - apt-get update - - apt-get install -y --no-install-recommends ca-certificates curl - - curl https://sh.rustup.rs > rustup.sh - - sh rustup.sh -y --default-host x86_64-unknown-linux-gnu - - export PATH="$CARGO_HOME/bin:$PATH" - - rustup install stable - - rustup install nightly - <<: *build-only-when-changes - -build-stable-no-default-features: - extends: .toolchain-stable - stage: build - script: - - cargo test --tests --no-default-features - <<: *build-only-when-changes - -build-stable-features-rich_presence: - extends: .toolchain-stable - stage: build - script: - - cargo test --tests --no-default-features - --features "rich_presence" - - cargo test --no-default-features - --features "rich_presence" - --example "discord_presence" - --example "discord_presence_subscribe" - <<: *build-only-when-changes - -build-nightly: - extends: .toolchain-nightly - stage: build - script: - - cargo test --tests - - cargo test --examples - <<: *build-only-when-changes - -deploy-crates-io: - extends: .toolchain-stable - stage: publish - script: - - cargo publish --token $CRATES_IO_API_TOKEN - only: - - tags@valeth/discord-rpc-client.rs diff --git a/.overcommit.yml b/.overcommit.yml deleted file mode 100644 index ee4d494..0000000 --- a/.overcommit.yml +++ /dev/null @@ -1,13 +0,0 @@ -PreCommit: - TrailingWhitespace: - enabled: true - exclude: - - 'target/**/*' - -PrePush: - CargoTest: - enabled: true - description: 'Run Cargo tests' - required_executable: 'cargo' - flags: ['test', '--all'] - include: "**/*.rs" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b25e85..1de1b43 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,9 +5,7 @@ Contributions to this project are welcome, just follow these steps. 1. Fork this repository and create a feature branch named after the feature you want to implement 2. Make your changes on your branch 3. Add some test if possibe -4. Make sure all tests pass (I recommend installing [Overcommit][overcommit]) +4. Make sure all tests pass 5. Submit a PR/MR on GitHub or GitLab > **Note**: Make sure you rebase your feature branch on top of master from time to time. - -[overcommit]: https://github.com/brigade/overcommit diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 017492b..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,22 +0,0 @@ -version: 1.0.{build} - -environment: - matrix: - - TARGET: x86_64-pc-windows-msvc - -install: - - appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe - - rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain stable - - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - - rustup -V - - cargo -V - -clone_depth: 1 - -skip_tags: true - -build: false - -test_script: - - cargo test --all - - cargo test --examples diff --git a/examples/discord_presence.rs b/examples/discord_presence.rs index 31ba4cd..86b76d0 100644 --- a/examples/discord_presence.rs +++ b/examples/discord_presence.rs @@ -1,6 +1,3 @@ -extern crate discord_rpc_client; -extern crate simplelog; - use discord_rpc_client::{models::Activity, Client as DiscordRPC}; use simplelog::*; use std::io; diff --git a/examples/discord_presence_subscribe.rs b/examples/discord_presence_subscribe.rs index 9aa93af..691b3a8 100644 --- a/examples/discord_presence_subscribe.rs +++ b/examples/discord_presence_subscribe.rs @@ -1,6 +1,3 @@ -extern crate discord_rpc_client; -extern crate simplelog; - use discord_rpc_client::{models::Event, Client as DiscordRPC}; use simplelog::*; use std::{thread, time};