Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🦀 Rust Rewrite #2

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .cargo-husky/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

# reminder:
# In order to make your changes made to this file noticeable,
# you'll need to delete the /target directory and run:
# `cargo test` again

set -e

echo '$ cargo clippy'
export RUSTFLAGS="-D warnings"
cargo clippy --all-targets --all-features

echo '$ cargo fmt'
cargo fmt --all -- --check

echo '$ cargo build --release'
cargo build --release

echo '$ cargo test'
cargo test
40 changes: 40 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on: push
jobs:
clippy-check:
name: 🧐 Clippy Check
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Run Clippy
run: cargo clippy --all-targets --all-features
fmt-check:
name: 👀 Fmt Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Run Fmt
run: cargo fmt --all -- --check
build-check:
name: 🔨 Build Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Try To Build
run: cargo build --release
cargo-test:
name: 🦀 Cargo Check
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Run Checks
run: cargo test
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
secrets.env
test.py
env/
.idea/
__pycache__/


# Added by cargo

/target
16 changes: 16 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "croissantdealer"
version = "0.1.0"
edition = "2021"
authors = ["Khenzii"]
description = "Chess bot"
repository = "https://github.com/Khenziii/croissantdealer"
readme = "README.md"
license-file = "LICENSE"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dev-dependencies.cargo-husky]
version = "1.5.0"
default-features = false
features = ["user-hooks"]
Loading