Skip to content

Commit 1a45e01

Browse files
committed
☕ Rewrite GitHub Action workflow for deno
See also vim-denops/denops.vim@74e5896
1 parent 6570d6a commit 1a45e01

File tree

1 file changed

+56
-40
lines changed

1 file changed

+56
-40
lines changed

.github/workflows/test.yml

Lines changed: 56 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: Test
22

33
env:
4-
DENO_VERSION: 1.x
54
DENOPS_PATH: "../denops.vim"
65

6+
defaults:
7+
run:
8+
shell: bash --noprofile --norc -eo pipefail {0}
9+
710
on:
811
schedule:
912
- cron: "0 7 * * 0"
@@ -23,47 +26,55 @@ on:
2326
- ".github/workflows/test.yml"
2427

2528
jobs:
26-
typecheck:
27-
runs-on: ubuntu-20.04
28-
29+
check:
30+
strategy:
31+
matrix:
32+
runner:
33+
- windows-latest
34+
- macos-latest
35+
- ubuntu-latest
36+
version:
37+
- "1.11.0"
38+
- "1.x"
39+
runs-on: ${{ matrix.runner }}
2940
steps:
41+
- run: git config --global core.autocrlf false
42+
if: runner.os == 'Windows'
3043
- uses: actions/checkout@v2
3144
- uses: denoland/setup-deno@main
3245
with:
33-
deno-version: ${{ env.DENO_VERSION }}
34-
- name: Type check
35-
run: make type-check
36-
37-
lint:
38-
runs-on: ubuntu-20.04
39-
40-
steps:
41-
- uses: actions/checkout@v2
42-
- uses: denoland/setup-deno@main
43-
with:
44-
deno-version: ${{ env.DENO_VERSION }}
45-
- name: Lint
46+
deno-version: "${{ matrix.version }}"
47+
- name: Lint check
4648
run: make lint
47-
48-
format:
49-
runs-on: ubuntu-20.04
50-
51-
steps:
52-
- uses: actions/checkout@v2
53-
- uses: denoland/setup-deno@main
54-
with:
55-
deno-version: ${{ env.DENO_VERSION }}
56-
- name: Format
49+
- name: Format check
5750
run: make fmt-check
51+
- name: Type check
52+
run: make type-check
5853

5954
test:
60-
runs-on: ubuntu-20.04
61-
62-
defaults:
63-
run:
64-
working-directory: ./repo
65-
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
runner:
59+
- windows-latest
60+
- macos-latest
61+
- ubuntu-latest
62+
version:
63+
- "1.11.0"
64+
- "1.x"
65+
host_version:
66+
- vim: "v8.1.2424"
67+
nvim: ""
68+
- vim: "v8.2.3081"
69+
nvim: ""
70+
- vim: ""
71+
nvim: "v0.4.4"
72+
- vim: ""
73+
nvim: "v0.5.0"
74+
runs-on: ${{ matrix.runner }}
6675
steps:
76+
- run: git config --global core.autocrlf false
77+
if: runner.os == 'Windows'
6778
- uses: actions/checkout@v2
6879
with:
6980
path: "./repo"
@@ -73,29 +84,34 @@ jobs:
7384
path: "./denops.vim"
7485
- uses: denoland/setup-deno@main
7586
with:
76-
deno-version: ${{ env.DENO_VERSION }}
87+
deno-version: "${{ matrix.version }}"
7788
- uses: rhysd/action-setup-vim@v1
7889
id: vim
7990
with:
80-
version: "v8.1.2424"
81-
- uses: rhysd/action-setup-vim@v1
82-
id: nvim
83-
with:
84-
neovim: true
85-
version: "v0.4.4"
91+
version: "${{ matrix.host_version.vim }}"
92+
if: matrix.host_version.vim != ''
8693
- name: Check Vim
8794
run: |
8895
echo ${DENOPS_TEST_VIM}
8996
${DENOPS_TEST_VIM} --version
9097
env:
9198
DENOPS_TEST_VIM: ${{ steps.vim.outputs.executable }}
99+
if: matrix.host_version.vim != ''
100+
- uses: rhysd/action-setup-vim@v1
101+
id: nvim
102+
with:
103+
neovim: true
104+
version: "${{ matrix.host_version.nvim }}"
105+
if: matrix.host_version.nvim != ''
92106
- name: Check Neovim
93107
run: |
94108
echo ${DENOPS_TEST_NVIM}
95109
${DENOPS_TEST_NVIM} --version
96110
env:
97111
DENOPS_TEST_NVIM: ${{ steps.nvim.outputs.executable }}
112+
if: matrix.host_version.nvim != ''
98113
- name: Test
114+
working-directory: ./repo
99115
run: make test
100116
env:
101117
DENOPS_TEST_VIM: ${{ steps.vim.outputs.executable }}

0 commit comments

Comments
 (0)