Repository navigation
51 lines (49 loc) · 1.7 KB
/
Copy pathci.yml
File metadata and controls
51 lines (49 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: CI Validation
on:
pull_request:
branches: [ "main" ]
push:
tags:
- '*' # Triggers on any tag push
workflow_dispatch: # Allows manual triggering from the Actions tab
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: nightly
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Cache Cargo artifacts
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Cache Plenary.nvim
uses: actions/cache@v3
with:
path: $HOME/.local/share/nvim/site/pack/test/start/plenary.nvim
key: ${{ runner.os }}-plenary-${{ hashFiles('$HOME/.local/share/nvim/site/pack/test/start/plenary.nvim/README.md') }}
- name: Install dependencies
run: |
if [ ! -d "$HOME/.local/share/nvim/site/pack/test/start/plenary.nvim" ]; then
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim \
"$HOME/.local/share/nvim/site/pack/test/start/plenary.nvim"
fi
cargo install --locked vimcats --features=cli
- name: Check docs
run: |
vimcats -fact $(tr '\n' ' ' < doclist) > /tmp/doc.txt
diff -u doc/swapdiff.nvim.txt /tmp/doc.txt
- name: Run tests
run: bash ./test.sh