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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user