chore: bump ci to more modern os and nvim versions (#2289)

This commit is contained in:
Simon Hauser
2022-12-28 13:11:00 +01:00
committed by GitHub
parent e960efa60e
commit 0a7588252a
4 changed files with 27 additions and 18 deletions

View File

@@ -10,30 +10,38 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: ubuntu-20.04 - os: ubuntu-22.04
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz rev: nightly/nvim-linux64.tar.gz
manager: sudo apt-get manager: sudo apt-get
packages: -y ripgrep packages: -y ripgrep
- os: ubuntu-20.04 - os: ubuntu-22.04
url: https://github.com/neovim/neovim/releases/download/v0.7.0/nvim-linux64.tar.gz rev: v0.7.2/nvim-linux64.tar.gz
manager: sudo apt-get manager: sudo apt-get
packages: -y ripgrep packages: -y ripgrep
- os: macos-10.15 - os: ubuntu-22.04
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-macos.tar.gz rev: v0.8.1/nvim-linux64.tar.gz
manager: sudo apt-get
packages: -y ripgrep
- os: macos-12
rev: nightly/nvim-macos.tar.gz
manager: brew manager: brew
packages: ripgrep packages: ripgrep
- os: macos-10.15 - os: macos-12
url: https://github.com/neovim/neovim/releases/download/v0.7.0/nvim-macos.tar.gz rev: v0.7.2/nvim-macos.tar.gz
manager: brew
packages: ripgrep
- os: macos-12
rev: v0.8.1/nvim-macos.tar.gz
manager: brew manager: brew
packages: ripgrep packages: ripgrep
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- run: date +%F > todays-date - run: date +%F > todays-date
- name: Restore from todays cache - name: Restore from todays cache
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: _neovim path: _neovim
key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }} key: ${{ runner.os }}-${{ matrix.rev }}-${{ hashFiles('todays-date') }}
- name: Prepare - name: Prepare
run: | run: |
@@ -41,7 +49,7 @@ jobs:
${{ matrix.manager }} install ${{ matrix.packages }} ${{ matrix.manager }} install ${{ matrix.packages }}
test -d _neovim || { test -d _neovim || {
mkdir -p _neovim mkdir -p _neovim
curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim" curl -sL "https://github.com/neovim/neovim/releases/download/${{ matrix.rev }}" | tar xzf - --strip-components=1 -C "${PWD}/_neovim"
} }
mkdir -p ~/.local/share/nvim/site/pack/vendor/start mkdir -p ~/.local/share/nvim/site/pack/vendor/start
git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim

View File

@@ -16,10 +16,10 @@ jobs:
- os: ubuntu-20.04 - os: ubuntu-20.04
url: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz url: https://github.com/neovim/neovim/releases/download/nightly/nvim-linux64.tar.gz
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- run: date +%F > todays-date - run: date +%F > todays-date
- name: Restore cache for today's nightly. - name: Restore cache for today's nightly.
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: _neovim path: _neovim
key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }} key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }}

View File

@@ -7,7 +7,7 @@ jobs:
name: Luacheck name: Luacheck
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Prepare - name: Prepare
run: | run: |
@@ -22,9 +22,10 @@ jobs:
name: stylua name: stylua
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v1 - uses: JohnnyMorganz/stylua-action@v2
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
version: latest
# CLI arguments # CLI arguments
args: --color always --check lua/ args: --color always --check lua/

View File

@@ -73,7 +73,7 @@ local opts_contain_invert = function(args)
if #v >= 2 and v:sub(1, 1) == "-" and v:sub(2, 2) ~= "-" then if #v >= 2 and v:sub(1, 1) == "-" and v:sub(2, 2) ~= "-" then
for i = 2, #v do for i = 2, #v do
local vi = v:sub(i, i) local vi = v:sub(i, i)
if vi == "=" then -- ignore option -g=xxx if vi == "=" then -- ignore option -g=xxx
break break
elseif vi == "v" then elseif vi == "v" then
invert = true invert = true