Skip to content

Commit

Permalink
Add CI workflow, PR and issue template
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Mahad <[email protected]>
  • Loading branch information
MahadMuhammad committed Jul 15, 2024
1 parent 65ad202 commit 44e8893
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE /bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Bug Report
about: Create a bug report to help us improve
labels: bug
title: '[bug] '
assignees: ''

---

**Describe the bug:**
A clear and concise description of the bug.

**To Reproduce:**
Steps to reproduce the behavior.

**Platform/Meta:**
Specify OS, distribution, git sha and hardware platform.
16 changes: 16 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--
Before submitting a PR, please read this:
- Give the PR a descriptive title.
Examples of bad title:
- fix #7123
- update docs
- fix bugs
- Make sure to run:
- [ ] `cargo check` ,
- [ ] `cargo test` and
- [ ] `cargo fmt`
before submitting the PR.
-->
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Rust Test to DejaGnu -- Build & Test

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full

jobs:
build_and_test:
name: Cargo Build, Test, Clippy, Fmt
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly

steps:
- name: Checkout sources
uses: actions/checkout@v4

- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

- name: Cargo Build
run: cargo build --verbose

- name: Cargo Test
run: cargo test --verbose

- name: Add rustup components
run: |
rustup component add rustfmt
rustup component add clippy
- name: Cargo fmt
run: cargo fmt --all --check

- name: Clippy check
run: cargo clippy --all-targets --all-features
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use clap::Parser;
use std::{fs, path, process};
use std::{fs, path};

#[derive(Parser)]
struct Cli {
Expand Down

0 comments on commit 44e8893

Please sign in to comment.