From 93975668caf9674f9a54f0247085fa5a2debe1b2 Mon Sep 17 00:00:00 2001 From: Marcus Cveticanin Date: Wed, 11 Dec 2024 16:11:10 +0100 Subject: [PATCH] Updating stuff --- .github/workflows/core.yml | 86 ++++++++++++++++++++++++++++++++++++++ .gitignore | 25 +++++++++++ Cargo.lock | 7 ++++ 3 files changed, 118 insertions(+) create mode 100644 .github/workflows/core.yml create mode 100644 Cargo.lock diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml new file mode 100644 index 0000000..3bd8c9a --- /dev/null +++ b/.github/workflows/core.yml @@ -0,0 +1,86 @@ +name: core + +on: + push: + branches: + - master + pull_request: + branches: + - master + paths-ignore: + - "**/README.md" + - "**/LICENSE" + - "**/.gitignore" + +jobs: + clippy: + name: Clippy + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + + - name: Cache Cargo Dependencies + uses: actions/cache@v4 + with: + path: | + ~/.cargo + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Run Clippy + run: cargo clippy --all-targets --all-features + + build: + name: Build + runs-on: ubuntu-latest + needs: clippy + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + + - name: Cache Cargo Dependencies + uses: actions/cache@v4 + with: + path: | + ~/.cargo + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Build Project + run: cargo build --release + + test: + name: Tests + runs-on: ubuntu-latest + needs: build + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + + - name: Cache Cargo Dependencies + uses: actions/cache@v4 + with: + path: | + ~/.cargo + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Run Tests + run: cargo test --all-features \ No newline at end of file diff --git a/.gitignore b/.gitignore index ea8c4bf..6c82d88 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,26 @@ +# Rust /target +**/*.rs.bk + +# JetBrains +.idea/ +*.iml +*.iws +*.ipr + +# VSCode +.vscode/ + +# macOS +.DS_Store +.AppleDouble +.LSOverride + +# Windows +Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ + +# Linux +*~ \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..97021b6 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "x-bot" +version = "0.1.0"