1
1
name : Test
2
2
3
3
on :
4
- schedule :
5
- - cron : " 0 7 * * 0"
6
4
push :
7
5
branches :
8
6
- main
9
7
pull_request :
8
+ paths :
9
+ - " **.md"
10
+ - " **.ts"
11
+ - " deno.jsonc"
12
+ - " .github/workflows/test.yml"
10
13
workflow_dispatch :
11
14
12
15
defaults :
19
22
matrix :
20
23
runner :
21
24
- ubuntu-latest
22
- version :
25
+ deno_version :
23
26
- " 1.x"
24
27
runs-on : ${{ matrix.runner }}
25
28
steps :
28
31
- uses : actions/checkout@v4
29
32
- uses : denoland/setup-deno@v1.1.4
30
33
with :
31
- deno-version : " ${{ matrix.version }}"
34
+ deno-version : " ${{ matrix.deno_version }}"
32
35
- uses : actions/cache@v4
33
36
with :
34
37
key : deno-${{ hashFiles('**/*') }}
49
52
- windows-latest
50
53
- macos-latest
51
54
- ubuntu-latest
52
- version :
55
+ deno_version :
53
56
- " 1.43.x"
54
57
- " 1.x"
55
58
host_version :
@@ -60,44 +63,51 @@ jobs:
60
63
steps :
61
64
- run : git config --global core.autocrlf false
62
65
if : runner.os == 'Windows'
66
+
63
67
- uses : actions/checkout@v4
64
- - uses : actions/checkout@v4
65
- with :
66
- repository : " vim-denops/denops.vim"
67
- path : " .deps/denops.vim"
68
+
68
69
- uses : denoland/setup-deno@v1.1.4
69
70
with :
70
- deno-version : " ${{ matrix.version }}"
71
+ deno-version : " ${{ matrix.deno_version }}"
72
+
73
+ - name : Get denops
74
+ run : |
75
+ git clone https://github.com/vim-denops/denops.vim /tmp/denops.vim
76
+ echo "DENOPS_TEST_DENOPS_PATH=/tmp/denops.vim" >> "$GITHUB_ENV"
77
+
71
78
- uses : rhysd/action-setup-vim@v1
72
79
id : vim
73
80
with :
74
81
version : " ${{ matrix.host_version.vim }}"
75
- - name : Check Vim
76
- run : |
77
- echo ${DENOPS_TEST_VIM}
78
- ${DENOPS_TEST_VIM} --version
79
- env :
80
- DENOPS_TEST_VIM : ${{ steps.vim.outputs.executable }}
82
+
81
83
- uses : rhysd/action-setup-vim@v1
82
84
id : nvim
83
85
with :
84
86
neovim : true
85
87
version : " ${{ matrix.host_version.nvim }}"
86
- - name : Check Neovim
88
+
89
+ - name : Export executables
90
+ run : |
91
+ echo "DENOPS_TEST_VIM_EXECUTABLE=${{ steps.vim.outputs.executable }}" >> "$GITHUB_ENV"
92
+ echo "DENOPS_TEST_NVIM_EXECUTABLE=${{ steps.nvim.outputs.executable }}" >> "$GITHUB_ENV"
93
+
94
+ - name : Check versions
95
+ run : |
96
+ deno --version
97
+ ${DENOPS_TEST_VIM_EXECUTABLE} --version
98
+ ${DENOPS_TEST_NVIM_EXECUTABLE} --version
99
+
100
+ - name : Perform pre-cache
87
101
run : |
88
- echo ${DENOPS_TEST_NVIM}
89
- ${DENOPS_TEST_NVIM} --version
90
- env :
91
- DENOPS_TEST_NVIM : ${{ steps.nvim.outputs.executable }}
102
+ deno cache ${DENOPS_TEST_DENOPS_PATH}/denops/@denops-private/mod.ts ./mod.ts
103
+
92
104
- name : Test
93
105
run : deno task test:coverage
94
- env :
95
- DENOPS_TEST_DENOPS_PATH : " .deps/denops.vim"
96
- DENOPS_TEST_VIM_EXECUTABLE : ${{ steps.vim.outputs.executable }}
97
- DENOPS_TEST_NVIM_EXECUTABLE : ${{ steps.nvim.outputs.executable }}
98
- timeout-minutes : 5
106
+ timeout-minutes : 15
107
+
99
108
- run : |
100
109
deno task coverage --lcov > coverage.lcov
110
+
101
111
- uses : codecov/codecov-action@v4
102
112
with :
103
113
os : ${{ runner.os }}
0 commit comments