Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI and upgrade supported Vim version #34

Merged
merged 3 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/neovim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Neovim

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- windows-latest
- ubuntu-latest
version:
- stable
- v0.4.4
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: thinca/vim-themis
path: vim-themis
- uses: rhysd/action-setup-vim@v1
id: nvim
with:
neovim: true
version: "${{ matrix.version }}"
- name: Run tests
env:
THEMIS_VIM: ${{ steps.nvim.outputs.executable }}
# XXX:
# Overwrite %TMP% to point a correct temp directory.
# Note that %TMP% only affects value of 'tempname()' in Windows.
# https://gh.neting.ccmunity/t5/GitHub-Actions/TEMP-is-broken-on-Windows/m-p/30432#M427
TMP: 'C:\Users\runneradmin\AppData\Local\Temp'
run: |
./vim-themis/bin/themis
45 changes: 0 additions & 45 deletions .github/workflows/test.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/vim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Vim

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- windows-latest
- ubuntu-latest
version:
- nightly
- v8.2.5136 # https://github.com/lambdalisue/vim-fern/issues/506
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: thinca/vim-themis
path: vim-themis
- uses: rhysd/action-setup-vim@v1
id: vim
with:
version: "${{ matrix.version }}"
- name: Run tests
env:
THEMIS_VIM: ${{ steps.vim.outputs.executable }}
# XXX:
# Overwrite %TMP% to point a correct temp directory.
# Note that %TMP% only affects value of 'tempname()' in Windows.
# https://gh.neting.ccmunity/t5/GitHub-Actions/TEMP-is-broken-on-Windows/m-p/30432#M427
TMP: 'C:\Users\runneradmin\AppData\Local\Temp'
run: |
./vim-themis/bin/themis
Comment on lines +41 to +42
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Pin vim-themis to the latest stable version v1.7.0

The vim-themis repository has several stable releases available. Currently, the workflow fetches the latest commit without version pinning. To ensure consistent test results, update the checkout action to use tag v1.7.0:

- uses: actions/checkout@v4
  with:
    repository: thinca/vim-themis
    path: vim-themis
    ref: v1.7.0
🔗 Analysis chain

Consider pinning vim-themis version.

The vim-themis testing framework is being used without version pinning. This could lead to inconsistent test results if breaking changes are introduced.


Let me try another approach to check the repository directly since the GitHub CLI command didn't provide the expected information.


Let me check if there's a specific commit hash or tag being used in other repositories that use vim-themis, which could help us recommend a stable version.


Let me try one final check to see if vim-themis has any tags in its repository directly.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if vim-themis has tagged releases we can pin to
gh release list --repo thinca/vim-themis

Length of output: 489


Script:

#!/bin/bash
# Check how vim-themis is being cloned/installed in the workflow
cat .github/workflows/vim.yml

# Also check if there are any git submodules that might contain vim-themis
cat .gitmodules 2>/dev/null || echo "No .gitmodules file found"

Length of output: 1220


Script:

#!/bin/bash
# Search for other popular vim plugins using vim-themis to see how they pin it
gh search repos "vim-themis path:.github/workflows language:yaml" --limit 5 --json fullName,url | jq -r '.[] | .fullName' | while read -r repo; do
  echo "=== Checking $repo ==="
  gh api "/repos/$repo/contents/.github/workflows" --jq '.[] | .download_url' | while read -r url; do
    if [ ! -z "$url" ]; then
      curl -s "$url" | grep -A 5 "thinca/vim-themis"
    fi
  done
done

Length of output: 138


Script:

#!/bin/bash
# Check if the vim-themis directory has any tags after it's checked out
cd vim-themis 2>/dev/null && git tag || echo "Directory not found"

# Also check the remote repository's default branch
git ls-remote --tags https://github.com/thinca/vim-themis

Length of output: 984

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 👓 nerdfont.vim

![Support Vim 8.1 or above](https://img.shields.io/badge/support-Vim%208.1%20or%20above-yellowgreen.svg)
![Support Neovim 0.4 or above](https://img.shields.io/badge/support-Neovim%200.4%20or%20above-yellowgreen.svg)
![Support Vim 8.2.5136 or above](https://img.shields.io/badge/support-Vim%208.2.5136%20or%20above-yellowgreen.svg)
![Support Neovim 0.4.4 or above](https://img.shields.io/badge/support-Neovim%200.4.4%20or%20above-yellowgreen.svg)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Doc](https://img.shields.io/badge/doc-%3Ah%20nerdfont-orange.svg)](doc/nerdfont.txt)

Expand Down
Loading