ci #53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
neovim: [v0.10.4, v0.11.1, Nightly] | |
include: | |
- neovim: v0.10.4 | |
features: "--features neovim-0-10" | |
- neovim: v0.11.1 | |
features: "--features neovim-0-11" | |
- neovim: Nightly | |
features: "--features neovim-nightly" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install MSRV | |
uses: ./.github/actions/install-msrv | |
- name: Install Neovim ${{ matrix.neovim }} | |
uses: rhysd/action-setup-vim@v1 | |
with: | |
neovim: true | |
version: ${{ matrix.neovim }} | |
- name: Run tests | |
run: cargo test --workspace ${{ matrix.features }} | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install MSRV with Clippy | |
uses: ./.github/actions/install-msrv | |
with: | |
components: clippy | |
- run: > | |
cargo clippy | |
--features neovim-nightly,libuv,mlua,test,test-terminator | |
--workspace | |
--tests | |
-- -D warnings | |
docs: | |
name: docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
- run: > | |
RUSTFLAGS="-D warnings" | |
RUSTDOCFLAGS="--cfg docsrs" | |
cargo doc --features neovim-nightly | |
format: | |
name: format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- run: cargo fmt --check |