зеркало из
https://github.com/glebtv/tui-textarea.git
synced 2026-08-28 11:36:17 +03:00
chore: ratatui 0.30 maintenance + collaboration baseline (#1)
Этот коммит содержится в:
27
.github/ISSUE_TEMPLATE/bug_report.md
поставляемый
Обычный файл
27
.github/ISSUE_TEMPLATE/bug_report.md
поставляемый
Обычный файл
@@ -0,0 +1,27 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Report a defect or regression
|
||||
title: "[bug] "
|
||||
labels: ["bug"]
|
||||
assignees: []
|
||||
---
|
||||
|
||||
## Summary
|
||||
Clear and concise description of the bug.
|
||||
|
||||
## Reproduction
|
||||
1. Step one
|
||||
2. Step two
|
||||
3. Observe failure
|
||||
|
||||
## Expected Behavior
|
||||
What should happen instead.
|
||||
|
||||
## Environment
|
||||
- OS:
|
||||
- Rust version:
|
||||
- tui-textarea version:
|
||||
- ratatui version:
|
||||
|
||||
## Additional Context
|
||||
Logs, screenshots, and relevant snippets.
|
||||
19
.github/ISSUE_TEMPLATE/compatibility_request.md
поставляемый
Обычный файл
19
.github/ISSUE_TEMPLATE/compatibility_request.md
поставляемый
Обычный файл
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: Compatibility request
|
||||
about: Request compatibility with ratatui/crossterm/etc.
|
||||
title: "[compat] "
|
||||
labels: ["compat-ratatui"]
|
||||
assignees: []
|
||||
---
|
||||
|
||||
## Compatibility Target
|
||||
Library and target version (for example ratatui 0.31).
|
||||
|
||||
## Current Behavior
|
||||
What fails today?
|
||||
|
||||
## Expected Outcome
|
||||
What should work after this request is addressed?
|
||||
|
||||
## Risks
|
||||
Any known API or behavior breakage concerns.
|
||||
5
.github/ISSUE_TEMPLATE/config.yml
поставляемый
Обычный файл
5
.github/ISSUE_TEMPLATE/config.yml
поставляемый
Обычный файл
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Security report
|
||||
url: https://github.com/srothgan/tui-textarea/security/advisories/new
|
||||
about: Please report security vulnerabilities privately.
|
||||
19
.github/ISSUE_TEMPLATE/feature_request.md
поставляемый
Обычный файл
19
.github/ISSUE_TEMPLATE/feature_request.md
поставляемый
Обычный файл
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Propose an enhancement
|
||||
title: "[feature] "
|
||||
labels: ["enhancement"]
|
||||
assignees: []
|
||||
---
|
||||
|
||||
## Problem
|
||||
What problem are you trying to solve?
|
||||
|
||||
## Proposed Change
|
||||
Describe the API or behavior you want.
|
||||
|
||||
## Alternatives
|
||||
What alternatives did you consider?
|
||||
|
||||
## Additional Context
|
||||
Any examples, references, or prior art.
|
||||
25
.github/branch-protection-main.json
поставляемый
Обычный файл
25
.github/branch-protection-main.json
поставляемый
Обычный файл
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"required_status_checks": {
|
||||
"strict": true,
|
||||
"contexts": [
|
||||
"cargo fmt --check",
|
||||
"cargo clippy -- -D warnings",
|
||||
"cargo check",
|
||||
"cargo test"
|
||||
]
|
||||
},
|
||||
"enforce_admins": true,
|
||||
"required_pull_request_reviews": {
|
||||
"dismiss_stale_reviews": true,
|
||||
"required_approving_review_count": 1,
|
||||
"require_code_owner_reviews": false
|
||||
},
|
||||
"restrictions": null,
|
||||
"required_conversation_resolution": true,
|
||||
"allow_force_pushes": false,
|
||||
"allow_deletions": false,
|
||||
"block_creations": false,
|
||||
"required_linear_history": false,
|
||||
"lock_branch": false,
|
||||
"allow_fork_syncing": true
|
||||
}
|
||||
16
.github/dependabot.yml
поставляемый
Обычный файл
16
.github/dependabot.yml
поставляемый
Обычный файл
@@ -0,0 +1,16 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: cargo
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
open-pull-requests-limit: 10
|
||||
groups:
|
||||
patch-and-minor:
|
||||
update-types:
|
||||
- patch
|
||||
- minor
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
14
.github/pull_request_template.md
поставляемый
Обычный файл
14
.github/pull_request_template.md
поставляемый
Обычный файл
@@ -0,0 +1,14 @@
|
||||
## Problem
|
||||
Describe the user-visible problem this PR solves.
|
||||
|
||||
## Change Summary
|
||||
List the key code and behavior changes.
|
||||
|
||||
## Test Evidence
|
||||
- [ ] `cargo fmt --check`
|
||||
- [ ] `cargo clippy --all-targets -- -D warnings`
|
||||
- [ ] `cargo check`
|
||||
- [ ] `cargo test`
|
||||
|
||||
## Breaking Changes
|
||||
Describe any API or behavior changes that may break existing users.
|
||||
121
.github/workflows/ci.yml
поставляемый
121
.github/workflows/ci.yml
поставляемый
@@ -1,79 +1,62 @@
|
||||
name: CI
|
||||
on: [push, pull_request]
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
unit-test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
fail-fast: true
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
- name: Run tests on Linux or macOS
|
||||
run: |
|
||||
cargo llvm-cov --color always --lcov --output-path lcov.info --features=search,termwiz,termion,serde,arbitrary
|
||||
cargo llvm-cov --color always --no-run
|
||||
if: ${{ matrix.os != 'windows-latest' }}
|
||||
- name: Run tests on Windows
|
||||
run: |
|
||||
cargo llvm-cov --color always --lcov --output-path lcov.info --features=search,termwiz,serde,arbitrary
|
||||
cargo llvm-cov --color always --no-run
|
||||
if: ${{ matrix.os == 'windows-latest' }}
|
||||
- run: cargo test --no-default-features --features=tuirs-crossterm,search -- --skip .rs
|
||||
- run: cargo test --no-default-features --features=tuirs-termion,search -- --skip .rs
|
||||
if: ${{ matrix.os != 'windows-latest' }}
|
||||
- run: cargo test --no-default-features --features=no-backend,search -- --skip .rs
|
||||
- run: cargo test --no-default-features --features=tuirs-no-backend,search -- --skip .rs
|
||||
- uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: lcov.info
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
lint:
|
||||
cargo-fmt:
|
||||
name: cargo fmt --check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy,rustfmt
|
||||
components: rustfmt
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo fmt -- --check
|
||||
- run: cargo clippy --examples --tests -- -D warnings
|
||||
- run: cargo clippy --examples --tests --features search,serde -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features termion -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features termion,search -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features termwiz -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features termwiz,search -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features no-backend -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features no-backend,search -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features tuirs-crossterm -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features tuirs-crossterm,search -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features tuirs-termion -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features tuirs-termion,search -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features tuirs-no-backend -- -D warnings
|
||||
- run: cargo clippy --examples --tests --no-default-features --features tuirs-no-backend,search -- -D warnings
|
||||
- run: cargo rustdoc --features=search,termwiz,termion,serde -p tui-textarea -- -D warnings
|
||||
cargo-doc:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@nightly
|
||||
- name: Run `cargo rustdoc` with same configuration as docs.rs
|
||||
run: |
|
||||
set -e
|
||||
md="$(cargo metadata --format-version=1 | jq '.packages[] | select(.name=="tui-textarea") | .metadata.docs.rs')"
|
||||
rustdoc_args="$(echo "$md" | jq -r '.["rustdoc-args"] | join(" ")') -D warnings"
|
||||
features="$(echo "$md" | jq -r '.features | join(",")')"
|
||||
- run: cargo fmt --check
|
||||
|
||||
set -x
|
||||
for target in $(echo "$md" | jq -r '.targets | join(" ")')
|
||||
do
|
||||
rustup target add "$target"
|
||||
cargo rustdoc -p tui-textarea "--features=$features" "--target=$target" -- $rustdoc_args
|
||||
done
|
||||
cargo-clippy:
|
||||
name: cargo clippy -- -D warnings
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo clippy --all-targets -- -D warnings
|
||||
|
||||
cargo-check:
|
||||
name: cargo check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo check
|
||||
|
||||
cargo-test:
|
||||
name: cargo test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo test
|
||||
|
||||
cross-platform:
|
||||
name: cross-platform default (${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- run: cargo check
|
||||
- run: cargo test
|
||||
|
||||
47
.github/workflows/release.yml
поставляемый
Обычный файл
47
.github/workflows/release.yml
поставляемый
Обычный файл
@@ -0,0 +1,47 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: "Cargo.toml version to release (for example 0.7.0)"
|
||||
required: true
|
||||
type: string
|
||||
publish:
|
||||
description: "Publish to crates.io (false runs dry validation only)"
|
||||
required: true
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
release:
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Verify requested version matches Cargo.toml
|
||||
shell: bash
|
||||
run: |
|
||||
actual="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
|
||||
if [[ -z "$actual" ]]; then
|
||||
echo "Could not parse version from Cargo.toml"
|
||||
exit 1
|
||||
fi
|
||||
if [[ "$actual" != "${{ inputs.version }}" ]]; then
|
||||
echo "Requested version ${{ inputs.version }} does not match Cargo.toml version $actual"
|
||||
exit 1
|
||||
fi
|
||||
- name: Validate package
|
||||
run: cargo package
|
||||
- name: Run full test suite
|
||||
run: cargo test
|
||||
- name: Publish to crates.io
|
||||
if: ${{ inputs.publish }}
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
run: cargo publish --locked --token "$CARGO_REGISTRY_TOKEN"
|
||||
Ссылка в новой задаче
Block a user