From 5124405c8e1c34188ef1de841d812de9161e866c Mon Sep 17 00:00:00 2001 From: Sho Sakuma Date: Tue, 9 Jul 2024 14:32:01 +0900 Subject: [PATCH] =?UTF-8?q?ci:=20`mkroening/rust-toolchain-toml`=20?= =?UTF-8?q?=E3=82=92=20`dtolnay/rust-toolchain`=20=E3=81=AB=E7=BD=AE?= =?UTF-8?q?=E3=81=8D=E6=8F=9B=E3=81=88=E3=82=8B=20(#152)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/labels.yml | 32 ----------------------- .github/renovate.json | 11 +++----- .github/workflows/auto-label-sync.yml | 23 ---------------- .github/workflows/{build.yaml => ci.yaml} | 21 ++++++++++----- .github/workflows/clippy.yaml | 30 --------------------- .github/workflows/fmt.yaml | 30 --------------------- 6 files changed, 18 insertions(+), 129 deletions(-) delete mode 100644 .github/labels.yml delete mode 100644 .github/workflows/auto-label-sync.yml rename .github/workflows/{build.yaml => ci.yaml} (59%) delete mode 100644 .github/workflows/clippy.yaml delete mode 100644 .github/workflows/fmt.yaml diff --git a/.github/labels.yml b/.github/labels.yml deleted file mode 100644 index 263f8d5..0000000 --- a/.github/labels.yml +++ /dev/null @@ -1,32 +0,0 @@ -# C - Category -- name: 'C-bug' - description: 'Category: bug' - color: '8ec1f5' -- name: 'C-security' - description: 'Category: security' - color: '8ec1f5' -- name: 'C-enhancement' - description: 'Category: enhancement' - color: '8ec1f5' -- name: 'C-cleanup' - description: 'Category: cleanup within codebase' - color: '8ec1f5' -- name: 'C-GitHub Actions' - description: 'Category: GitHub Actions' - color: '8ec1f5' -- name: 'C-improvement' - description: 'Category: improvement' - color: '8ec1f5' -- name: 'C-development' - description: 'Category: development' - color: '8ec1f5' - -# P - Priority -- name: 'P-high' - description: 'Priority: High' - color: 'f79d6d' - -- name: 'Help wanted' - color: 'ab7aeb' -- name: 'good first issue' - color: 'ab7aeb' diff --git a/.github/renovate.json b/.github/renovate.json index 9e0f276..735e0bf 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,9 +1,6 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:recommended" - ], - "addLabels": [ - "renovate" - ] + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["config:recommended"], + "addLabels": ["renovate"], + "automerge": true } diff --git a/.github/workflows/auto-label-sync.yml b/.github/workflows/auto-label-sync.yml deleted file mode 100644 index 5cbedce..0000000 --- a/.github/workflows/auto-label-sync.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Label sync - - -on: - push: - branches: - - main - paths: - - '.github/labels.yml' - workflow_dispatch: - -jobs: - label-sync: - name: Labeler - runs-on: ubuntu-latest - steps: - - name: checkout - uses: actions/checkout@v4 - - - name: Run Label Sync - uses: crazy-max/ghaction-github-labeler@v5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build.yaml b/.github/workflows/ci.yaml similarity index 59% rename from .github/workflows/build.yaml rename to .github/workflows/ci.yaml index 698e566..13f1372 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/ci.yaml @@ -1,14 +1,12 @@ -name: Build babyrite +name: CI on: push: branches: - main - - 'release/v*.*.*' pull_request: branches: - main - - 'release/v*.*.*' jobs: build: @@ -17,14 +15,23 @@ jobs: steps: - name: Checkout branch uses: actions/checkout@v4 - + - name: Setup toolchain - uses: mkroening/rust-toolchain-toml@v1.3.0 - + uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + - name: Setup cache uses: Swatinem/rust-cache@v2 with: prefix-key: "babyrite/gh-actions-cache" - + + - name: Run rustfmt + run: cargo fmt --all -- --check + + - name: Run clippy + run: cargo clippy --all-targets --all-features + - name: Run Build run: cargo build --verbose + diff --git a/.github/workflows/clippy.yaml b/.github/workflows/clippy.yaml deleted file mode 100644 index be9e939..0000000 --- a/.github/workflows/clippy.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: clippy - -on: - push: - branches: - - main - - 'release/v*.*.*' - pull_request: - branches: - - main - - 'release/v*.*.*' - -jobs: - clippy: - runs-on: ubuntu-latest - name: clippy babyrite - steps: - - name: Checkout branch - uses: actions/checkout@v4 - - - name: Setup toolchain - uses: mkroening/rust-toolchain-toml@v1.3.0 - - - name: Setup cache - uses: Swatinem/rust-cache@v2 - with: - prefix-key: "babyrite/gh-actions-cache" - - - name: Run clippy - run: cargo clippy --all-targets --all-features diff --git a/.github/workflows/fmt.yaml b/.github/workflows/fmt.yaml deleted file mode 100644 index a8c7c4d..0000000 --- a/.github/workflows/fmt.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: rustfmt - -on: - push: - branches: - - main - - 'release/v*.*.*' - pull_request: - branches: - - main - - 'release/v*.*.*' - -jobs: - fmt: - runs-on: ubuntu-latest - name: rustfmt babyrite - steps: - - name: Checkout branch - uses: actions/checkout@v4 - - - name: Setup toolchain - uses: mkroening/rust-toolchain-toml@v1.3.0 - - - name: Setup cache - uses: Swatinem/rust-cache@v2 - with: - prefix-key: "babyrite/gh-actions-cache" - - - name: Run rustfmt - run: cargo fmt --all -- --check