Skip to content

Merge pull request #405 from vim-denops/split-tests #1103

Merge pull request #405 from vim-denops/split-tests

Merge pull request #405 from vim-denops/split-tests #1103

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
paths:
- "**.ts"
- "**.vim"
- "**.md"
- "**.json{c,}"
- ".github/workflows/test.yml"
workflow_dispatch:
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@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: 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 }}