diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ecf6f38 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,58 @@ +name: Rust CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + CLICOLOR: 1 + +jobs: + build-debug: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Configure Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - name: Build Debug + run: cargo build + + build-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Configure Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - name: Build Debug + run: cargo build --release + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Configure Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - name: Test + run: cargo test + + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Configure Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + components: clippy + - name: Run Linter + run: cargo clippy \ No newline at end of file diff --git a/README.md b/README.md index f1207cb..ca8bc77 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ A simple self-contained CLI tool that makes it easy to efficiently encrypt/decrypt your files. +[![Build](https://github.com/arthur3486/cryptic/workflows/Build/badge.svg?branch=main)](https://github.com/arthur3486/cryptic/actions) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ## Contents