Skip to content

Commit b773bfa

Browse files
authored
Merge pull request #220 from vim-denops/fix-ci
☕ Fix CI
2 parents 9f7a83b + 5d66b61 commit b773bfa

File tree

4 files changed

+68
-70
lines changed

4 files changed

+68
-70
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ on:
44
schedule:
55
- cron: "0 7 * * 0"
66
push:
7-
branches:
8-
- main
7+
paths:
8+
- "**.md"
9+
- "**.ts"
10+
- ".github/workflows/test.yml"
11+
- "deno.jsonc"
912
pull_request:
1013
paths:
1114
- "**.md"
1215
- "**.ts"
1316
- ".github/workflows/test.yml"
14-
- "Makefile"
17+
- "deno.jsonc"
1518

1619
defaults:
1720
run:
@@ -64,10 +67,10 @@ jobs:
6467
steps:
6568
- run: git config --global core.autocrlf false
6669
if: runner.os == 'Windows'
67-
- uses: actions/checkout@v3
70+
- uses: actions/checkout@v4
6871
with:
6972
path: "./repo"
70-
- uses: actions/checkout@v3
73+
- uses: actions/checkout@v4
7174
with:
7275
repository: "vim-denops/denops.vim"
7376
path: "./denops.vim"
@@ -80,41 +83,36 @@ jobs:
8083
restore-keys: deno-
8184
path: |
8285
/home/runner/.cache/deno/deps/https/deno.land
83-
- uses: thinca/action-setup-vim@v1
86+
- uses: rhysd/action-setup-vim@v1
8487
id: vim
8588
with:
86-
vim_type: "Vim"
87-
vim_version: "${{ matrix.host_version.vim }}"
88-
# NOTE:
89-
# On Linux, Vim must be built from source to fix `input` issue
90-
# https://github.com/thinca/action-setup-vim/issues/11
91-
download: "${{ (runner.OS == 'Linux' && 'never') || 'available' }}"
89+
version: "${{ matrix.host_version.vim }}"
9290
- name: Check Vim
9391
run: |
9492
echo ${DENOPS_TEST_VIM}
9593
${DENOPS_TEST_VIM} --version
9694
env:
97-
DENOPS_TEST_VIM: ${{ steps.vim.outputs.executable_path }}
98-
- uses: thinca/action-setup-vim@v1
95+
DENOPS_TEST_VIM: ${{ steps.vim.outputs.executable }}
96+
- uses: rhysd/action-setup-vim@v1
9997
id: nvim
10098
with:
101-
vim_type: "Neovim"
102-
vim_version: "${{ matrix.host_version.nvim }}"
99+
neovim: true
100+
version: "${{ matrix.host_version.nvim }}"
103101
- name: Check Neovim
104102
run: |
105103
echo ${DENOPS_TEST_NVIM}
106104
${DENOPS_TEST_NVIM} --version
107105
env:
108-
DENOPS_TEST_NVIM: ${{ steps.nvim.outputs.executable_path }}
106+
DENOPS_TEST_NVIM: ${{ steps.nvim.outputs.executable }}
109107
- name: Cache
110108
run: deno cache $(find . -name '*.ts')
111109
working-directory: ./repo
112110
- name: Test
113111
run: deno task test
114112
env:
115113
DENOPS_TEST_DENOPS_PATH: "../denops.vim"
116-
DENOPS_TEST_VIM_EXECUTABLE: ${{ steps.vim.outputs.executable_path }}
117-
DENOPS_TEST_NVIM_EXECUTABLE: ${{ steps.nvim.outputs.executable_path }}
114+
DENOPS_TEST_VIM_EXECUTABLE: ${{ steps.vim.outputs.executable }}
115+
DENOPS_TEST_NVIM_EXECUTABLE: ${{ steps.nvim.outputs.executable }}
118116
working-directory: ./repo
119117
timeout-minutes: 3
120118
- run: |

.github/workflows/udd.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/update.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: update
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
workflow_dispatch:
7+
8+
jobs:
9+
update:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: denoland/setup-deno@v1
14+
with:
15+
deno-version: 1.x
16+
- name: Configure Git
17+
run: |
18+
git config user.name github-actions[bot]
19+
git config user.email github-actions[bot]@users.noreply.github.com
20+
- name: Update dependencies and commit changes
21+
run: deno task -q upgrade:commit --summary ../title.txt --report ../body.md
22+
- name: Check result
23+
id: result
24+
uses: andstor/file-existence-action@v2
25+
with:
26+
files: ../title.txt, ../body.md
27+
- name: Read title.txt
28+
id: title
29+
if: steps.result.outputs.files_exists == 'true'
30+
uses: juliangruber/read-file-action@v1
31+
with:
32+
path: ../title.txt
33+
- name: Read body.md
34+
id: body
35+
if: steps.result.outputs.files_exists == 'true'
36+
uses: juliangruber/read-file-action@v1
37+
with:
38+
path: ../body.md
39+
- name: Create a pull request
40+
if: steps.result.outputs.files_exists == 'true'
41+
uses: peter-evans/create-pull-request@v5
42+
with:
43+
token: ${{ secrets.PA_TOKEN }}
44+
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
45+
branch: automation/update-dependencies
46+
title: ${{ steps.title.outputs.content }}
47+
body: ${{ steps.body.outputs.content }}
48+
labels: automation
49+
delete-branch: true

deno.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"test": "deno test --unstable -A --doc --parallel --shuffle --coverage=.coverage",
55
"check": "deno check --unstable $(find . -name '*.ts')",
66
"coverage": "deno coverage --unstable .coverage",
7-
"upgrade": "deno run -A https://deno.land/x/udd/main.ts $(find . -name '*.ts')",
7+
"upgrade": "deno run -q -A https://deno.land/x/molt@0.11.0/cli.ts ./**/*.ts",
8+
"upgrade:commit": "deno task -q upgrade --commit --prefix :package: --pre-commit=fmt",
89
"gen:function": "deno run --unstable -A ./scripts/gen-function/gen-function.ts",
910
"gen:option": "deno run --unstable -A ./scripts/gen-option/gen-option.ts",
1011
"gen": "deno task gen:function && deno task gen:option && deno fmt"

0 commit comments

Comments
 (0)