Test #733
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
schedule: | |
- cron: "0 7 * * 0" | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- "**.md" | |
- "**.ts" | |
- ".github/workflows/test.yml" | |
- "Makefile" | |
defaults: | |
run: | |
shell: bash --noprofile --norc -eo pipefail {0} | |
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@v3 | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: "${{ matrix.version }}" | |
- uses: actions/cache@v3 | |
with: | |
key: deno-${{ hashFiles('**/*') }} | |
restore-keys: deno- | |
path: | | |
/home/runner/.cache/deno/deps/https/deno.land | |
- name: Lint check | |
run: deno lint | |
- name: Format check | |
run: deno fmt --check | |
- name: Type check | |
run: deno task check | |
test: | |
strategy: | |
matrix: | |
runner: | |
- windows-latest | |
- macos-latest | |
- ubuntu-latest | |
version: | |
- "1.32.x" | |
- "1.x" | |
host_version: | |
- vim: "v9.0.1499" | |
nvim: "v0.8.0" | |
runs-on: ${{ matrix.runner }} | |
timeout-minutes: 15 | |
steps: | |
- run: git config --global core.autocrlf false | |
if: runner.os == 'Windows' | |
- uses: actions/checkout@v3 | |
with: | |
path: "./repo" | |
- uses: actions/checkout@v3 | |
with: | |
repository: "vim-denops/denops.vim" | |
path: "./denops.vim" | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: "${{ matrix.version }}" | |
- uses: actions/cache@v3 | |
with: | |
key: deno-${{ hashFiles('**/*') }} | |
restore-keys: deno- | |
path: | | |
/home/runner/.cache/deno/deps/https/deno.land | |
- uses: thinca/action-setup-vim@v1 | |
id: vim | |
with: | |
vim_type: "Vim" | |
vim_version: "${{ matrix.host_version.vim }}" | |
# NOTE: | |
# On Linux, Vim must be built from source to fix `input` issue | |
# https://github.com/thinca/action-setup-vim/issues/11 | |
download: "${{ (runner.OS == 'Linux' && 'never') || 'available' }}" | |
- name: Check Vim | |
run: | | |
echo ${DENOPS_TEST_VIM} | |
${DENOPS_TEST_VIM} --version | |
env: | |
DENOPS_TEST_VIM: ${{ steps.vim.outputs.executable_path }} | |
- uses: thinca/action-setup-vim@v1 | |
id: nvim | |
with: | |
vim_type: "Neovim" | |
vim_version: "${{ matrix.host_version.nvim }}" | |
- name: Check Neovim | |
run: | | |
echo ${DENOPS_TEST_NVIM} | |
${DENOPS_TEST_NVIM} --version | |
env: | |
DENOPS_TEST_NVIM: ${{ steps.nvim.outputs.executable_path }} | |
- name: Cache | |
run: deno cache $(find . -name '*.ts') | |
working-directory: ./repo | |
- name: Test | |
run: deno task test | |
env: | |
DENOPS_TEST_DENOPS_PATH: "../denops.vim" | |
DENOPS_TEST_VIM_EXECUTABLE: ${{ steps.vim.outputs.executable_path }} | |
DENOPS_TEST_NVIM_EXECUTABLE: ${{ steps.nvim.outputs.executable_path }} | |
working-directory: ./repo | |
timeout-minutes: 3 | |
- run: | | |
deno coverage --unstable .coverage --lcov > coverage.lcov | |
working-directory: ./repo | |
- uses: codecov/codecov-action@v3 | |
with: | |
os: ${{ runner.os }} | |
files: ./repo/coverage.lcov |