From 513caf310d18b91ceee1b1ea7e83a8c41921754b Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Wed, 24 Apr 2024 23:57:03 +0200 Subject: [PATCH] add workflows + issue template --- .github/ISSUE_TEMPLATE/blank_issue.md | 4 ++ .github/ISSUE_TEMPLATE/bug_report.md | 21 ++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.md | 13 ++++ .github/dependabot.yml | 6 ++ .github/workflows/ci.yml | 79 +++++++++++++++++++++++ .github/workflows/prettier.yml | 18 ++++++ 7 files changed, 142 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/blank_issue.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/prettier.yml diff --git a/.github/ISSUE_TEMPLATE/blank_issue.md b/.github/ISSUE_TEMPLATE/blank_issue.md new file mode 100644 index 00000000..e7ec9a2b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/blank_issue.md @@ -0,0 +1,4 @@ +--- +name: Blank Issue (do not use this for bug reports or feature requests) +about: Create an issue with a blank template. +--- diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..22f882a4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,21 @@ +--- +name: Bug Report +about: Report a correctness issue or violated expectation +labels: bug +--- + +#### Bug Description: + +#### Expected Result: + +#### Steps to Reproduce: + +#### Possible Solutions: + +#### Possible Additional Information: + +#### Operating system + +#### cosmic-files version + +#### Logs, Panic Messages, Stack Traces: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..0086358d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..cc2f9eaf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,13 @@ +--- +name: Feature Request +about: Request a feature +labels: enhancement +--- + +#### Use Case: + +#### Proposed Change: + +#### Who Benefits From The Change(s)?: + +#### Alternative Approaches: diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..adee0ed1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..348a78b6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,79 @@ +name: Continuous Integration + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + + paths-ignore: + - "**.md" + +# cancel previous workflow of the PR +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + +jobs: + format: + if: github.event.pull_request.draft == false + strategy: + fail-fast: false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - name: Format + run: cargo fmt --all --check --verbose + + tests: + needs: + - format + if: github.event.pull_request.draft == false + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + + - name: System dependencies + if: startsWith(matrix.os, 'ubuntu') + run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev + + - name: Run Tests + run: cargo test --workspace --all-features + env: + RUST_BACKTRACE: full + + clippy: + needs: + - format + if: github.event.pull_request.draft == false + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + + - name: System dependencies + if: startsWith(matrix.os, 'ubuntu') + run: sudo apt-get update; sudo apt-get install -y libxkbcommon-dev libwayland-dev + + - name: Run Clippy + run: cargo clippy --workspace --all-features + env: + RUST_BACKTRACE: full \ No newline at end of file diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml new file mode 100644 index 00000000..efc6447f --- /dev/null +++ b/.github/workflows/prettier.yml @@ -0,0 +1,18 @@ +name: Prettier + +on: + workflow_dispatch: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + prettier: + name: Prettier fmt + if: github.event.pull_request.draft == false + strategy: + fail-fast: false + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Prettier + run: npx prettier --check . \ No newline at end of file