55 branches :
66 - main
77 pull_request :
8+ paths :
9+ - " **.md"
10+ - " **.ts"
11+ - " deno.jsonc"
12+ - " .github/workflows/test.yml"
813 workflow_dispatch :
14+ inputs :
15+ denops_branch :
16+ description : " Denops branch to test"
17+ required : false
18+ default : " main"
919
1020defaults :
1121 run :
1222 shell : bash --noprofile --norc -eo pipefail {0}
1323
24+ env :
25+ DENOPS_BRANCH : ${{ github.event.inputs.denops_branch || 'main' }}
26+
1427jobs :
1528 check :
16- runs-on : ubuntu-latest
29+ strategy :
30+ matrix :
31+ runner :
32+ - ubuntu-latest
33+ deno_version :
34+ - " 1.x"
35+ runs-on : ${{ matrix.runner }}
1736 steps :
37+ - run : git config --global core.autocrlf false
38+ if : runner.os == 'Windows'
1839 - uses : actions/checkout@v4
19- - uses : denoland/setup-deno@v1
20- - name : Lint
40+ -
uses :
denoland/[email protected] 41+ with :
42+ deno-version : " ${{ matrix.deno_version }}"
43+ - uses : actions/cache@v4
44+ with :
45+ key : deno-${{ hashFiles('**/*') }}
46+ restore-keys : deno-
47+ path : |
48+ /home/runner/.cache/deno/deps/https/deno.land
49+ - name : Lint check
2150 run : deno lint
22- - name : Format
51+ - name : Format check
2352 run : deno fmt --check
2453 - name : Type check
2554 run : deno task check
55+ - name : Gen check
56+ run : |
57+ deno task gen
58+ git diff --exit-code
2659
2760 test :
2861 strategy :
@@ -32,39 +65,43 @@ jobs:
3265 - macos-latest
3366 - ubuntu-latest
3467 deno_version :
35- - " 1.45.x "
68+ - " 1.45.0 "
3669 - " 1.x"
3770 host_version :
3871 - vim : " v9.1.0448"
3972 nvim : " v0.10.0"
40-
4173 runs-on : ${{ matrix.runner }}
42-
74+ timeout-minutes : 15
4375 steps :
4476 - run : git config --global core.autocrlf false
4577 if : runner.os == 'Windows'
4678
4779 - uses : actions/checkout@v4
4880
49- - uses : denoland/setup-deno@v1
81+ - uses : denoland/setup-deno@v1.1.4
5082 with :
51- deno-version : ${{ matrix.deno_version }}
83+ deno-version : " ${{ matrix.deno_version }}"
5284
5385 - name : Get denops
5486 run : |
5587 git clone https://github.com/vim-denops/denops.vim /tmp/denops.vim
5688 echo "DENOPS_TEST_DENOPS_PATH=/tmp/denops.vim" >> "$GITHUB_ENV"
5789
90+ - name : Try switching denops branch
91+ run : |
92+ git -C /tmp/denops.vim switch ${{ env.DENOPS_BRANCH }} || true
93+ git -C /tmp/denops.vim branch
94+
5895 - uses : rhysd/action-setup-vim@v1
5996 id : vim
6097 with :
61- version : ${{ matrix.host_version.vim }}
98+ version : " ${{ matrix.host_version.vim }}"
6299
63100 - uses : rhysd/action-setup-vim@v1
64101 id : nvim
65102 with :
66103 neovim : true
67- version : ${{ matrix.host_version.nvim }}
104+ version : " ${{ matrix.host_version.nvim }}"
68105
69106 - name : Export executables
70107 run : |
@@ -79,14 +116,15 @@ jobs:
79116
80117 - name : Perform pre-cache
81118 run : |
82- deno cache ${DENOPS_TEST_DENOPS_PATH}/denops/@denops-private/mod.ts
83- deno cache . /denops/**/* .ts
119+ deno cache \
120+ ${DENOPS_TEST_DENOPS_PATH}/denops/@denops-private/mod.ts . /denops/fall/main .ts
84121
85- - name : Run tests
86- run : |
87- deno task test:coverage
122+ - name : Test
123+ run : deno task test:coverage
124+ timeout-minutes : 15
125+
126+ - run : |
88127 deno task coverage --lcov > coverage.lcov
89- timeout-minutes : 5
90128
91129 - uses : codecov/codecov-action@v4
92130 with :
0 commit comments