diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..e5eec895 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + test: + name: "Test" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: "Check" + run: cargo check + - name: "Build" + run: cargo build + - name: "Test" + run: cargo test + + clippy: + name: "Clippy" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: "Clippy" + run: cargo clippy + + rustfmt: + name: "Formatting" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: "rustfmt" + run: cargo fmt -- --check diff --git a/.gitignore b/.gitignore index 088ba6ba..f2e972dd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,5 @@ # will have compiled files and executables /target/ -# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries -# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html -Cargo.lock - # These are backup files generated by rustfmt **/*.rs.bk diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000..54d00349 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "dora-rs" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000..65450b6d --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "dora-rs" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[workspace] + diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 00000000..73cb934d --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "stable" +components = ["rustfmt", "clippy"] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 00000000..47ad8c63 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello World!"); +}