diff --git a/.gitattributes b/.gitattributes index c625f6a..5e55b80 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ * text=auto -*.rv text eol=lf +*.rv text eol=lf linguist-language=Rust *.c text eol=lf *.h text eol=lf *.md text eol=lf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4db485b..4e8d85d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,17 @@ name: CI on: push: branches: [main] + tags: ["v*"] pull_request: branches: [main] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +permissions: + contents: read + jobs: test: strategy: @@ -13,11 +21,14 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} + timeout-minutes: 10 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - name: Install Raven uses: martian56/setup-raven@v1 + with: + raven-version: "2.26.1" - name: Build run: rvpm build @@ -27,3 +38,6 @@ jobs: - name: Format check run: rvpm fmt --check + + - name: Documentation + run: rvpm doc diff --git a/README.md b/README.md index 6b29817..ccf1344 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # perch +[![CI](https://github.com/martian56/perch/actions/workflows/ci.yml/badge.svg)](https://github.com/martian56/perch/actions/workflows/ci.yml) + Raw terminal control for Raven. Keypresses as they happen, mouse reports, terminal size, and unbuffered writes, on Linux, macOS, and Windows. @@ -23,7 +25,7 @@ the same one Raven already needs for linking. ## Usage -```raven +```rust import "github.com/martian56/perch" { Terminal } import "github.com/martian56/perch/keys" { InputEvent, Key }