Skip to content

Commit

Permalink
Merge pull request #19 from lambdalisue/fix-ci
Browse files Browse the repository at this point in the history
CI の修正
  • Loading branch information
lambdalisue authored Aug 3, 2024
2 parents 4d62505 + 2befb63 commit 87e1326
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 126 deletions.
100 changes: 24 additions & 76 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,107 +1,55 @@
name: test
name: Test

on:
schedule:
- cron: "0 7 * * 0"
push:
branches:
- main
paths:
- "**/*.md"
- "**/*.ts"
- "**/*.vim"
- ".github/workflows/test.yml"
- "deno.jsonc"
pull_request:
paths:
- "**/*.md"
- "**/*.ts"
- "**/*.vim"
- ".github/workflows/test.yml"
- "**.md"
- "**.ts"
- "**.vim"
- "deno.jsonc"
- ".github/workflows/test.yml"
workflow_dispatch:
inputs:
denops_branch:
description: 'Denops branch to test'
required: false
default: 'main'

defaults:
run:
shell: bash --noprofile --norc -eo pipefail {0}

env:
DENOPS_BRANCH: ${{ github.event.inputs.denops_branch || 'main' }}

jobs:
check:
strategy:
matrix:
runner:
- ubuntu-latest
version:
deno_version:
- "1.x"
runs-on: ${{ matrix.runner }}
steps:
- run: git config --global core.autocrlf false
if: runner.os == 'Windows'
- uses: actions/checkout@v2
- uses: denoland/setup-deno@v1
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1.1.4
with:
deno-version: "${{ matrix.version }}"
deno-version: "${{ matrix.deno_version }}"
- uses: actions/cache@v4
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.0"
- "1.x"
host_version:
- vim: "v9.0.1499"
nvim: "v0.8.0"
runs-on: ${{ matrix.runner }}
steps:
- run: git config --global init.defaultBranch main
- run: git config --global core.autocrlf false
if: runner.os == 'Windows'
- uses: actions/checkout@v2
with:
path: "./repo"
- uses: actions/checkout@v2
with:
repository: "vim-denops/denops.vim"
path: "./denops.vim"
- uses: denoland/setup-deno@v1
with:
deno-version: "${{ matrix.version }}"
- uses: thinca/action-setup-vim@v1
id: vim
with:
vim_type: "Vim"
vim_version: "${{ matrix.host_version.vim }}"
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 }}
- name: Test
working-directory: ./repo
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 }}
48 changes: 0 additions & 48 deletions .github/workflows/udd.yml

This file was deleted.

4 changes: 2 additions & 2 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"lock": false,
"tasks": {
"test": "deno test -A --doc --parallel --shuffle",
"check": "deno check **/*.ts",
"upgrade": "deno run --unstable-kv --allow-env --allow-read --allow-write --allow-run=git,deno --allow-net=jsr.io,api.jsr.io,cdn.jsdelivr.net jsr:@molt/cli@^0.19.1 **/*.ts"
"update": "deno run --allow-env --allow-read --allow-write=. --allow-run=git,deno --allow-net=deno.land,jsr.io,registry.npmjs.org jsr:@molt/cli ./**/*.ts",
"update:commit": "deno task -q update --commit --prefix :package: --pre-commit=fmt,lint"
}
}

0 comments on commit 87e1326

Please sign in to comment.