update tests

This commit is contained in:
Hörmet Yiltiz 2023-12-21 13:48:41 -05:00
parent 4c06c1f9a7
commit 10d438d078
2 changed files with 25 additions and 23 deletions

View File

@ -20,31 +20,37 @@ jobs:
matrix: matrix:
nvim-versions: ['stable', 'nightly'] nvim-versions: ['stable', 'nightly']
steps: steps:
- name: Checkout - name: Install NeoVim
uses: actions/checkout@v2
- uses: rhysd/action-setup-vim@v1 - uses: rhysd/action-setup-vim@v1
with: with:
neovim: true neovim: true
version: ${{ matrix.nvim-versions }} version: ${{ matrix.nvim-versions }}
- name: Setup lua - name: Checkout
uses: leafo/gh-actions-lua@v8 - uses: actions/checkout@v3
with: - name: Setup kitckstart and start nvim
luaVersion: '5.1.5'
- name: Setup luarocks
uses: leafo/gh-actions-luarocks@v4
- name: Install dependencies
run: | run: |
luarocks install luacheck ln -sf $GITHUB_WORKSPACE "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
- name: Run linter touch msg.log
run: luacheck lua/ spec/ nvim --headless -c ':Lazy! sync' -c ':qa' init.lua 2>&1 | tee -a msg.log
- name: Run tests nvim --headless -c ':checkhealth' -c ':qa' init.lua 2>&1 | tee -a msg.log
run: make test echo -e '\n++++++++++++++++++++++++++++++'
stylua: cat msg.log
echo -e '++++++++++++++++++++++++++++++\n'
grep -i 'error' msg.log
if [ $? -eq 0 ]; then
exit 1
else
exit 0
fi
stylua-check:
name: Check codestyle name: Check codestyle
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - name: Checkout Code
- uses: JohnnyMorganz/stylua-action@v3 uses: actions/checkout@v4
- name: Stylua Check
uses: JohnnyMorganz/stylua-action@v3
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
version: latest version: latest

View File

@ -9,6 +9,8 @@ on:
branches: [ "master" ] branches: [ "master" ]
pull_request: pull_request:
branches: [ "master" ] branches: [ "master" ]
schedule:
- cron: '0 7 * * 1'
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: workflow_dispatch:
@ -51,9 +53,3 @@ jobs:
else else
exit 0 exit 0
fi fi