generated from linrongbin16/ci-template.nvim
-
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (54 loc) · 1.38 KB
/
ci.yml
File metadata and controls
54 lines (54 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
commits:
name: Commits
if: ${{ github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --config-path .stylua.toml ./lua ./spec
- uses: cargo-bins/cargo-binstall@main
- name: Selene
run: |
cargo binstall --no-confirm selene
selene --config selene.toml ./lua
- uses: stevearc/nvim-typecheck-action@v2
with:
path: lua
configpath: ".luarc.json"
unit_test:
name: Unit Test
strategy:
matrix:
nvim_version: [v0.10.0, stable, nightly]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: ${{ matrix.nvim_version }}
- name: Run Test Cases
run: make test