-
Notifications
You must be signed in to change notification settings - Fork 2
115 lines (102 loc) · 2.76 KB
/
main.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: main
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize]
concurrency:
group: github.head_ref
cancel-in-progress: true
jobs:
fmt:
runs-on: ubuntu-latest
name: fmt
steps:
- uses: actions/checkout@v3
- uses: JohnnyMorganz/stylua-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
args: --check .
lint:
runs-on: ubuntu-latest
name: lint
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Luacheck linter
uses: lunarmodules/luacheck@v1
with:
args: lua
documentation:
runs-on: ubuntu-latest
name: documentation
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: setup neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
version: v0.8.3
- name: generate documentation
run: make docs
- name: check docs diff
run: exit $(git status --porcelain doc | wc -l | tr -d " ")
# tests:
# TODO: enable me again once there are tests
# needs:
# - lint
# - documentation
# runs-on: ubuntu-latest
# timeout-minutes: 2
# strategy:
# matrix:
# neovim_version: ['v0.9.0', 'v0.9.1', 'nightly']
#
# steps:
# - uses: actions/checkout@v3
#
# - run: date +%F > todays-date
#
# - name: restore cache for today's nightly.
# uses: actions/cache@v3
# with:
# path: _neovim
# key: ${{ runner.os }}-x64-${{ hashFiles('todays-date') }}
#
# - name: setup neovim
# uses: rhysd/action-setup-vim@v1
# with:
# neovim: true
# version: ${{ matrix.neovim_version }}
#
# - name: run tests
# run: make test
# release:
# TODO: do I want this release feature-
# name: release
# if: ${{ github.ref == 'refs/heads/main' }}
# # needs:
# # - tests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
#
# - uses: google-github-actions/release-please-action@v3
# id: release
# with:
# release-type: simple
# package-name: presenting.nvim
#
# - name: tag stable versions
# if: ${{ steps.release.outputs.release_created }}
# run: |
# git config user.name github-actions[bot]
# git config user.email github-actions[bot]@users.noreply.github.com
# git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
# git tag -d stable || true
# git push origin :stable || true
# git tag -a stable -m "Last Stable Release"
# git push origin stable