-
Notifications
You must be signed in to change notification settings - Fork 36
102 lines (98 loc) · 2.64 KB
/
test.yml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: test
env:
DENOPS_TEST_DENOPS_PATH: "../denops.vim"
DENO_DIR: ".deno"
on:
push:
branches:
- main
paths:
- "**/*.md"
- "**/*.ts"
- "**/*.vim"
- ".github/workflows/test.yml"
- "Makefile"
pull_request:
paths:
- "**/*.md"
- "**/*.ts"
- "**/*.vim"
- ".github/workflows/test.yml"
- "Makefile"
defaults:
run:
shell: bash --noprofile --norc -eo pipefail {0}
jobs:
test:
strategy:
matrix:
runner:
# - windows-latest
- macos-latest
- ubuntu-latest
version:
- "1.28.0"
- "1.x"
host_version:
- vim: "v9.0.0449"
nvim: "v0.8.0"
runs-on: ${{ matrix.runner }}
steps:
- run: git config --global init.defaultBranch main
- run: git config --global core.autocrlf false
if: runner.os == 'Windows'
- uses: actions/checkout@v2
with:
path: "./repo"
- uses: actions/checkout@v2
with:
repository: "vim-denops/denops.vim"
path: "./denops.vim"
- uses: denoland/setup-deno@v1
with:
deno-version: "${{ matrix.version }}"
- uses: actions/cache@v2
id: cache
with:
path: ${{ env.DENO_DIR }}
key: ${{ runner.os }}-deno-${{ matrix.version }}-${{ hashFiles('**/*.ts') }}
restore-keys: |
${{ runner.os }}-deno-${{ matrix.version }}-
${{ runner.os }}-deno-
- name: Lint check
working-directory: ./repo
run: deno lint
- name: Format check
working-directory: ./repo
run: deno fmt --check
- uses: thinca/action-setup-vim@v1
id: vim
with:
vim_type: "Vim"
vim_version: "${{ matrix.host_version.vim }}"
download: "never"
- name: Check Vim
run: |
echo ${DENOPS_TEST_VIM}
${DENOPS_TEST_VIM} --version
env:
DENOPS_TEST_VIM: ${{ steps.vim.outputs.executable_path }}
- uses: thinca/action-setup-vim@v1
id: nvim
with:
vim_type: "Neovim"
vim_version: "${{ matrix.host_version.nvim }}"
- name: Check Neovim
run: |
echo ${DENOPS_TEST_NVIM}
${DENOPS_TEST_NVIM} --version
env:
DENOPS_TEST_NVIM: ${{ steps.nvim.outputs.executable_path }}
- name: Test
working-directory: ./repo
run: deno test -A
env:
DENO_DIR: ../.deno
DENOPS_TEST_VIM: ${{ steps.vim.outputs.executable_path }}
DENOPS_TEST_NVIM: ${{ steps.nvim.outputs.executable_path }}
timeout-minutes: 5