-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 2.11 KB
/
Copy pathvalidate.yml
File metadata and controls
73 lines (63 loc) · 2.11 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Validate Neovim Config
on:
push:
branches: ["**"]
pull_request:
branches: [master]
jobs:
validate:
name: Build & validate Neovim
runs-on: ubuntu-latest
# Skip docs: and chore: commits on push; always run on pull requests
if: |
github.event_name == 'pull_request' ||
(
!startsWith(github.event.head_commit.message, 'docs:') &&
!startsWith(github.event.head_commit.message, 'chore:')
)
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build devcontainer image
uses: docker/build-push-action@v6
with:
context: .
file: .devcontainer/Dockerfile
tags: nvim-config:ci
load: true
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Check Neovim version
run: docker run --rm nvim-config:ci nvim --version
- name: Prepare plugin data directory
run: |
mkdir -p $HOME/.local/share/nvim-ci
chmod 777 $HOME/.local/share/nvim-ci
- name: Cache lazy.nvim plugins
uses: actions/cache@v4
with:
path: ~/.local/share/nvim-ci
key: nvim-plugins-${{ hashFiles('lua/plugins/**/*.lua') }}
restore-keys: nvim-plugins-
- name: Install plugins via lazy.nvim
run: |
docker run --rm \
-e CI=true \
-v "${{ github.workspace }}:/home/dev/.config/nvim:ro" \
-v "$HOME/.local/share/nvim-ci:/home/dev/.local/share/nvim" \
nvim-config:ci \
nvim --headless \
-c "lua require('lazy').sync({wait=true, show=false})" \
-c "qall"
timeout-minutes: 15
- name: Validate Neovim loads with all plugins
run: |
docker run --rm \
-e CI=true \
-v "${{ github.workspace }}:/home/dev/.config/nvim:ro" \
-v "$HOME/.local/share/nvim-ci:/home/dev/.local/share/nvim" \
nvim-config:ci \
nvim --headless -c "qall"
timeout-minutes: 2