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
This commit is contained in:
2026-06-03 20:11:03 -03:00
parent cd4bfffef9
commit d188b09fde
2 changed files with 14 additions and 10 deletions
+12 -8
View File
@@ -6,6 +6,10 @@ on:
pull_request: pull_request:
branches: [main] branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
RUST_BACKTRACE: "1" RUST_BACKTRACE: "1"
@@ -28,8 +32,8 @@ jobs:
~/.cargo/git ~/.cargo/git
target target
key: ${{ runner.os }}-cargo-fmt-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} key: ${{ runner.os }}-cargo-fmt-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
restore-keys: | restore-keys:
${{ runner.os }}-cargo-fmt- - ${{ runner.os }}-cargo-fmt-
- run: cargo fmt --all -- --check - run: cargo fmt --all -- --check
clippy: clippy:
@@ -48,8 +52,8 @@ jobs:
~/.cargo/git ~/.cargo/git
target target
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
restore-keys: | restore-keys:
${{ runner.os }}-cargo-clippy- - ${{ runner.os }}-cargo-clippy-
- run: cargo clippy --workspace --all-targets -- -D warnings - run: cargo clippy --workspace --all-targets -- -D warnings
test: test:
@@ -66,8 +70,8 @@ jobs:
~/.cargo/git ~/.cargo/git
target target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
restore-keys: | restore-keys:
${{ runner.os }}-cargo-test- - ${{ runner.os }}-cargo-test-
- run: cargo test --workspace --all-targets - run: cargo test --workspace --all-targets
keymaps: keymaps:
@@ -88,8 +92,8 @@ jobs:
~/.cargo/git ~/.cargo/git
target target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
restore-keys: | restore-keys:
${{ runner.os }}-cargo-test- - ${{ runner.os }}-cargo-test-
- name: install Neovim + Vim - name: install Neovim + Vim
run: | run: |
set -euo pipefail set -euo pipefail
+2 -2
View File
@@ -57,8 +57,8 @@ jobs:
~/.cargo/git ~/.cargo/git
target target
key: ${{ runner.os }}-cargo-release-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-release-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: | restore-keys:
${{ runner.os }}-cargo-release-${{ matrix.target }}- - ${{ runner.os }}-cargo-release-${{ matrix.target }}-
- name: Build nuwiki-ls - name: Build nuwiki-ls
env: env: