From 54183c0c70b0e97af537887b04fd97187e7b752d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B6rmet=20Yiltiz?= Date: Wed, 20 Dec 2023 21:54:42 -0500 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..89831fc0 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,48 @@ +# copied from gbprod/yanky.nvim +name: Integration + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: '0 7 * * 1' + +jobs: + test: + name: Tests + runs-on: ubuntu-latest + strategy: + matrix: + nvim-versions: ['stable', 'nightly'] + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: rhysd/action-setup-vim@v1 + with: + neovim: true + version: ${{ matrix.nvim-versions }} + - name: Setup ‘lua’ + uses: leafo/gh-actions-lua@v8 + with: + luaVersion: '5.1.5' + - name: Setup ‘luarocks’ + uses: leafo/gh-actions-luarocks@v4 + - name: Install dependencies + run: | + luarocks install luacheck + - name: Run linter + run: luacheck lua/ spec/ + - name: Run tests + run: make test + stylua: + name: Check codestyle + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: JohnnyMorganz/stylua-action@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + version: latest + args: --check .