-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (60 loc) · 1.72 KB
/
ci.yml
File metadata and controls
65 lines (60 loc) · 1.72 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
55
56
57
58
59
60
61
62
63
64
65
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.actor }}
cancel-in-progress: true
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust (for stylua)
uses: dtolnay/rust-toolchain@stable
- name: Install stylua
run: cargo install stylua
- name: Check formatting with stylua
run: make fmt-check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Lua and Luacheck
run: |
sudo apt-get update
sudo apt-get install -y lua5.1 luarocks
sudo luarocks install luacheck
- name: Run Luacheck
run: luacheck lua tests plugin
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install Lua and Luarocks Dependencies
run: |
sudo apt-get update
sudo apt-get install -y lua5.1 luarocks
# Install busted and luacov locally
luarocks install --local busted
luarocks install --local luacov
- name: Add local luarocks bin to PATH
run: echo "${HOME}/.luarocks/bin" >> $GITHUB_PATH
- name: Run tests with coverage
env:
LUA_PATH: "./lua/?.lua;./lua/?/init.lua;${LUA_PATH}"
run: busted tests --coverage
- name: Generate coverage report
run: luacov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: zhisme/copy_with_context.nvim