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/[email protected]
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,57 +52,80 @@ jobs:
49
52
- windows-latest
50
53
- macos-latest
51
54
- ubuntu-latest
52
- version :
53
- - " 1.38 .x"
55
+ deno_version :
56
+ - " 1.45 .x"
54
57
- " 1.x"
55
58
host_version :
56
- - vim : " v9.0.2189 "
57
- nvim : " v0.9.4 "
59
+ - vim : " v9.1.0448 "
60
+ nvim : " v0.10.0 "
58
61
runs-on : ${{ matrix.runner }}
59
62
timeout-minutes : 15
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/[email protected]
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
+
78
+ - name : Try switching denops branch
79
+ run : |
80
+ git -C /tmp/denops.vim switch ${{ github.head_ref || github.ref_name }} || true
81
+ git -C /tmp/denops.vim branch
82
+
71
83
- uses : rhysd/action-setup-vim@v1
72
84
id : vim
73
85
with :
74
86
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 }}
87
+
81
88
- uses : rhysd/action-setup-vim@v1
82
89
id : nvim
83
90
with :
84
91
neovim : true
85
92
version : " ${{ matrix.host_version.nvim }}"
86
- - name : Check Neovim
93
+
94
+ - name : Export executables
87
95
run : |
88
- echo ${DENOPS_TEST_NVIM}
89
- ${DENOPS_TEST_NVIM} --version
90
- env :
91
- DENOPS_TEST_NVIM : ${{ steps.nvim.outputs.executable }}
96
+ echo "DENOPS_TEST_VIM_EXECUTABLE=${{ steps.vim.outputs.executable }}" >> "$GITHUB_ENV"
97
+ echo "DENOPS_TEST_NVIM_EXECUTABLE=${{ steps.nvim.outputs.executable }}" >> "$GITHUB_ENV"
98
+
99
+ - name : Check versions
100
+ run : |
101
+ deno --version
102
+ ${DENOPS_TEST_VIM_EXECUTABLE} --version
103
+ ${DENOPS_TEST_NVIM_EXECUTABLE} --version
104
+
105
+ - name : Perform pre-cache
106
+ run : |
107
+ deno cache ${DENOPS_TEST_DENOPS_PATH}/denops/@denops-private/mod.ts ./mod.ts
108
+
92
109
- name : Test
93
110
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
111
+ timeout-minutes : 15
112
+
99
113
- run : |
100
114
deno task coverage --lcov > coverage.lcov
115
+
101
116
- uses : codecov/codecov-action@v4
102
117
with :
103
118
os : ${{ runner.os }}
104
119
files : ./coverage.lcov
105
120
token : ${{ secrets.CODECOV_TOKEN }}
121
+
122
+ jsr-publish :
123
+ runs-on : ubuntu-latest
124
+ steps :
125
+ - uses : actions/checkout@v4
126
+ - uses : denoland/setup-deno@v1
127
+ with :
128
+ deno-version : ${{ env.DENO_VERSION }}
129
+ - name : Publish (dry-run)
130
+ run : |
131
+ deno publish --dry-run
0 commit comments