-
Notifications
You must be signed in to change notification settings - Fork 8
85 lines (67 loc) · 1.66 KB
/
build.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Build
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
all:
name: All
runs-on: ubuntu-22.04
env:
RUSTFLAGS: "--deny warnings"
defaults:
run:
working-directory: tests
steps:
- uses: actions/checkout@v4
# Vim maybe already installed, but this appears to be an undocumented implementation detail.
# Make sure Vim is installed and working, and log Vim version.
- name: Vim
run: |
if ! which vim ;then
sudo apt-get update
sudo apt-get -y install vim
fi
vim --version
- name: Download Neovim
run: gh -R neovim/neovim release download -p nvim-linux64.tar.gz
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Neovim
run: |
tar -C "$HOME" -xaf nvim-linux64.tar.gz
"$HOME/nvim-linux64/bin/nvim" --version
- name: Rust Toolchain Info
run: |
rustc --version
cargo --version
cargo clippy --version
cargo fmt --version
- uses: Swatinem/rust-cache@96a8d65dbafbc7d145a9b2b6c3b12ee335738cd2
with:
workspaces: ./tests -> target
- name: Build
run: cargo build --workspace
- name: Clippy
run: cargo clippy --all-targets --all-features
- name: Check Formatting
run: cargo fmt --all --check
- name: Test Vim
run: |
cargo run
cargo run --bin=test-ftdetect
- name: Test Neovim
run: |
export TEST_VIM="$HOME/nvim-linux64/bin/nvim"
cargo run
cargo run --bin=test-ftdetect