From c942369745526d59cacd48386c045b766370b810 Mon Sep 17 00:00:00 2001 From: Johannes Heuel Date: Thu, 6 Jun 2024 15:18:52 +0200 Subject: [PATCH] remove drone CI --- .drone.yml | 18 ------------ .github/workflows/rust.yml | 56 ++++++++++++++++++++++++++++++++------ README.md | 3 -- 3 files changed, 48 insertions(+), 29 deletions(-) delete mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 7d47cb9..0000000 --- a/.drone.yml +++ /dev/null @@ -1,18 +0,0 @@ -kind: pipeline -type: docker -name: default - -steps: - - name: pre-commit - image: iamthefij/drone-pre-commit:latest - commands: - - apt-get update && apt-get install -y cmake - - curl https://sh.rustup.rs -sSf | bash -s -- -y - - export PATH="/root/.cargo/bin:$${PATH}" - - pre-commit run --all-files - - name: test - image: rust:latest - commands: - - apt-get update && apt-get install -y cmake - - cargo build --verbose --all - - cargo test --verbose --all diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5659f2f..1a8eef4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,18 +9,58 @@ env: CARGO_TERM_COLOR: always jobs: - pre-commit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v3 - - uses: pre-commit/action@v3.0.1 - build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - run: sudo apt-get update + - run: sudo apt-get install -y cmake + - uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Build run: cargo build --verbose + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: sudo apt-get update + - run: sudo apt-get install -y cmake + - uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Run tests - run: cargo test --verbose + run: cargo test --verbose --all-features + + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: sudo apt-get update + - run: sudo apt-get install -y cmake + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: clippy + - name: Run clippy + run: cargo clippy + + fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: sudo apt-get update + - run: sudo apt-get install -y cmake + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: rustfmt + - name: Rustfmt Check + uses: actions-rust-lang/rustfmt@v1 + + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: sudo apt-get update + - run: sudo apt-get install -y cmake + - uses: actions/setup-python@v3 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: rustfmt + - uses: pre-commit/action@v3.0.1 diff --git a/README.md b/README.md index a2d7976..c275cee 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,6 @@

Ohrwurm

-

- -

# Deployment Create a `.env` environment file that contains the `DISCORD_TOKEN` and `DISCORD_APP_ID` of your bot, then build the container with `docker-compose build` before running it with `docker-compose up`.