diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..9b4afd1 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,47 @@ +name: Rust CI + +on: + push: + branches: [ main, feature ] + pull_request: + branches: [ main, feature ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Run Build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build + run: cargo build --verbose + + test: + name: Run Tests + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Run tests + run: cargo test --verbose + + lint: + name: Run Linter (clippy) + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Run linter + run: cargo clippy -- -D warnings + + format: + name: Check Formatting + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Run cargo fmt + run: cargo fmt -- --check