diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 53f8242a..9d51c925 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,6 @@ updates: directory: "/" schedule: interval: "weekly" + commit-message: + prefix: chore(deps) + prefix-development: chore(dev-deps) diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json new file mode 100644 index 00000000..b8b52a50 --- /dev/null +++ b/.github/pr-title-checker-config.json @@ -0,0 +1,35 @@ +{ + "LABEL": { + "name": "invalid-title", + "color": "FF00000" + }, + "CHECKS": { + "prefixes": [ + "feat: ", + "feature: ", + "fix: ", + "bugfix: ", + "perf: ", + "refactor: ", + "test: ", + "tests: ", + "build: ", + "ci: ", + "doc: ", + "docs: ", + "style: ", + "chore: ", + "other: " + ], + "regexp": "^\\w+(\\([a-z_-]\\))?: ", + "regexpFlags": "", + "ignoreLabels": [ + "skip-title-check" + ] + }, + "MESSAGES": { + "success": "PR title is valid", + "failure": "PR title is invalid", + "notice": "" + } +} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..d434705d --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,21 @@ +name: "PR validation" +on: + pull_request_target: + types: + - opened + - edited + - synchronize + - labeled + - unlabeled + +jobs: + check: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: thehanimo/pr-title-checker@v1.4.3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + pass_on_octokit_error: false + configuration_path: .github/pr-title-checker-config.json diff --git a/.github/workflows/ci.yml b/.github/workflows/test.yml similarity index 95% rename from .github/workflows/ci.yml rename to .github/workflows/test.yml index 96970e6a..9ebe4426 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/test.yml @@ -8,8 +8,7 @@ on: - master jobs: - test: - name: test + e2e: runs-on: ${{matrix.os}} strategy: matrix: @@ -54,6 +53,8 @@ jobs: toolchain: ${{ matrix.rust }} target: ${{ matrix.target }} override: true + - name: Cache + uses: Swatinem/rust-cache@v2 - name: Build run: cargo build --release - name: Run Tests @@ -61,11 +62,8 @@ jobs: env: LC_ALL: en_US.UTF-8 TERM: xterm-256color - - name: Cache - uses: Swatinem/rust-cache@v1 clippy: - name: clippy runs-on: ${{matrix.os}} strategy: matrix: @@ -111,13 +109,12 @@ jobs: target: ${{ matrix.target }} override: true components: clippy + - name: Cache + uses: Swatinem/rust-cache@v2 - name: Clippy run: cargo clippy - - name: Cache - uses: Swatinem/rust-cache@v1 rustfmt: - name: rustfmt runs-on: ubuntu-latest steps: - name: Checkout repository