-
-
Notifications
You must be signed in to change notification settings - Fork 35
119 lines (102 loc) · 2.73 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Test
on:
push:
branches:
- main
pull_request:
paths:
- "**.ts"
- "**.vim"
- "**.md"
- "**.json{c,}"
- ".github/workflows/test.yml"
workflow_dispatch:
inputs:
verbose:
type: boolean
required: false
description: 'Enable verbose output'
default: false
defaults:
run:
shell: bash --noprofile --norc -eo pipefail {0}
env:
DENOPS_TEST_VERBOSE: ${{ github.event.inputs.verbose }}
jobs:
check:
strategy:
matrix:
runner:
- ubuntu-latest
version:
- "1.x"
runs-on: ${{ matrix.runner }}
steps:
- run: git config --global core.autocrlf false
if: runner.os == 'Windows'
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1.1.4
with:
deno-version: "${{ matrix.version }}"
- name: Lint check
run: deno lint
- name: Format check
run: deno fmt --check
- name: Type check
run: deno task check
- name: Doc check
run: deno task check:doc
- name: Supported version inconsistency check
run: |
deno task apply:supported-versions
git diff --exit-code
test:
needs: check
strategy:
fail-fast: false
matrix:
runner:
- windows-latest
- macos-latest
- ubuntu-latest
deno_version:
- "1.45.0"
- "1.x"
host_version:
- vim: "v9.1.0448"
nvim: "v0.10.0"
runs-on: ${{ matrix.runner }}
steps:
- run: git config --global core.autocrlf false
if: runner.os == 'Windows'
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: "${{ matrix.deno_version }}"
- uses: rhysd/action-setup-vim@v1
id: vim
with:
version: "${{ matrix.host_version.vim }}"
- uses: rhysd/action-setup-vim@v1
id: nvim
with:
neovim: true
version: "${{ matrix.host_version.nvim }}"
- name: Export executables
run: |
echo "DENOPS_TEST_VIM_EXECUTABLE=${{ steps.vim.outputs.executable }}" >> "$GITHUB_ENV"
echo "DENOPS_TEST_NVIM_EXECUTABLE=${{ steps.nvim.outputs.executable }}" >> "$GITHUB_ENV"
- name: Perform pre-cache
run: deno cache ./denops/@denops-private/mod.ts
- name: Test
run: deno task test:coverage
env:
DENOPS_TEST_DENOPS_PATH: "./"
timeout-minutes: 10
- run: |
deno task coverage --lcov > coverage.lcov
- uses: codecov/codecov-action@v4
with:
os: ${{ runner.os }}
files: ./coverage.lcov
token: ${{ secrets.CODECOV_TOKEN }}