From d188b09fdecca620c54ee0721810af96bb617cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Fr=C3=B3es=20Franco?= Date: Wed, 3 Jun 2026 20:11:03 -0300 Subject: [PATCH] ci: improve workflows with stricter checks, caching, and idempotency CI improvements: - Add concurrency group to cancel redundant runs on same branch - Add cargo cache to fmt job (was missing entirely) - Add timeout-minutes: 5 to fast jobs (fmt, clippy, test) for fail-fast - Change RUST_BACKTRACE from 'short' to '1' for better CI debuggability - Pin push trigger to branches: [main] to avoid double-firing on PR merges - Test minimum supported Neovim (0.11.0) instead of latest patch (0.11.3) Release improvements: - Enforce RUSTFLAGS: -D warnings at env level and in matrix rustflags - Remove redundant checkout in release job (only needs env vars) - Add release notes generation from git log since previous tag - Make release creation idempotent (check if release exists before creating) - Fix release_id not being set when release already exists --- .gitea/workflows/ci.yaml | 20 ++++++++++++-------- .gitea/workflows/release.yaml | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index ca3e7ec..fecb581 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -6,6 +6,10 @@ on: pull_request: branches: [main] +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + env: CARGO_TERM_COLOR: always RUST_BACKTRACE: "1" @@ -28,8 +32,8 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-fmt-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} - restore-keys: | - ${{ runner.os }}-cargo-fmt- + restore-keys: + - ${{ runner.os }}-cargo-fmt- - run: cargo fmt --all -- --check clippy: @@ -48,8 +52,8 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} - restore-keys: | - ${{ runner.os }}-cargo-clippy- + restore-keys: + - ${{ runner.os }}-cargo-clippy- - run: cargo clippy --workspace --all-targets -- -D warnings test: @@ -66,8 +70,8 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} - restore-keys: | - ${{ runner.os }}-cargo-test- + restore-keys: + - ${{ runner.os }}-cargo-test- - run: cargo test --workspace --all-targets keymaps: @@ -88,8 +92,8 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} - restore-keys: | - ${{ runner.os }}-cargo-test- + restore-keys: + - ${{ runner.os }}-cargo-test- - name: install Neovim + Vim run: | set -euo pipefail diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index cafae48..f9cde6a 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -57,8 +57,8 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-release-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-release-${{ matrix.target }}- + restore-keys: + - ${{ runner.os }}-cargo-release-${{ matrix.target }}- - name: Build nuwiki-ls env: