Update README.md #164
Workflow file for this run
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: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- "**.md" | |
- "**.ts" | |
- "deno.jsonc" | |
- ".github/workflows/test.yml" | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash --noprofile --norc -eo pipefail {0} | |
jobs: | |
check: | |
strategy: | |
matrix: | |
runner: | |
- ubuntu-latest | |
deno_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 | |
with: | |
deno-version: "${{ matrix.deno_version }}" | |
- 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 | |
deno_version: | |
- "1.45.x" | |
- "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 }} | |
- name: Get denops | |
run: | | |
git clone https://github.com/vim-denops/denops.vim /tmp/denops.vim | |
echo "DENOPS_TEST_DENOPS_PATH=/tmp/denops.vim" >> "$GITHUB_ENV" | |
- 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: Check versions | |
run: | | |
deno --version | |
${DENOPS_TEST_VIM_EXECUTABLE} --version | |
${DENOPS_TEST_NVIM_EXECUTABLE} --version | |
- name: Perform pre-cache | |
run: | | |
deno cache ${DENOPS_TEST_DENOPS_PATH}/denops/@denops-private/mod.ts ./mod.ts | |
- name: Run tests | |
run: deno task test:coverage | |
timeout-minutes: 15 | |
- run: | | |
deno task coverage --lcov > coverage.lcov | |
- uses: codecov/codecov-action@v4 | |
with: | |
os: ${{ runner.os }} | |
files: ./coverage.lcov | |
token: ${{ secrets.CODECOV_TOKEN }} | |
jsr-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: "1.x" | |
- name: Publish (dry-run) | |
run: | | |
deno publish --dry-run |