|
1 | 1 | name: CI
|
| 2 | + |
2 | 3 | on:
|
3 | 4 | push:
|
| 5 | + branches: [main, master] |
4 | 6 | pull_request:
|
5 | 7 |
|
6 | 8 | jobs:
|
7 |
| - tests: |
8 |
| - strategy: |
9 |
| - matrix: |
10 |
| - # os: [ubuntu-latest, windows-latest] |
11 |
| - os: [ubuntu-latest] |
12 |
| - runs-on: ${{ matrix.os }} |
13 |
| - steps: |
14 |
| - - uses: actions/checkout@v3 |
15 |
| - - name: Install Neovim |
16 |
| - shell: bash |
17 |
| - run: | |
18 |
| - mkdir -p /tmp/nvim |
19 |
| - wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage |
20 |
| - cd /tmp/nvim |
21 |
| - chmod a+x ./nvim.appimage |
22 |
| - ./nvim.appimage --appimage-extract |
23 |
| - echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH |
24 |
| - - name: Run Tests |
25 |
| - run: | |
26 |
| - nvim --version |
27 |
| - [ ! -d tests ] && exit 0 |
28 |
| - tests/run |
29 |
| - docs: |
30 |
| - runs-on: ubuntu-latest |
31 |
| - needs: tests |
32 |
| - steps: |
33 |
| - - uses: actions/checkout@v3 |
34 |
| - - name: Install Neovim |
35 |
| - shell: bash |
36 |
| - run: | |
37 |
| - mkdir -p /tmp/nvim |
38 |
| - wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage |
39 |
| - cd /tmp/nvim |
40 |
| - chmod a+x ./nvim.appimage |
41 |
| - ./nvim.appimage --appimage-extract |
42 |
| - echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH |
43 |
| - - name: Generate docs |
44 |
| - run: | |
45 |
| - nvim --version |
46 |
| - nvim -u tests/minit.lua -l lua/trouble/docs.lua |
47 |
| - - name: panvimdoc |
48 |
| - uses: kdheepak/panvimdoc@main |
49 |
| - with: |
50 |
| - vimdoc: trouble.nvim |
51 |
| - version: "Neovim >= 0.8.0" |
52 |
| - demojify: true |
53 |
| - treesitter: true |
54 |
| - - name: Push changes |
55 |
| - uses: stefanzweifel/git-auto-commit-action@v4 |
56 |
| - with: |
57 |
| - commit_message: "chore(build): auto-generate vimdoc" |
58 |
| - commit_user_name: "github-actions[bot]" |
59 |
| - commit_user_email: "github-actions[bot]@users.noreply.github.com" |
60 |
| - commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>" |
61 |
| - release: |
62 |
| - name: release |
63 |
| - if: ${{ github.ref == 'refs/heads/main' }} |
64 |
| - needs: |
65 |
| - - docs |
66 |
| - - tests |
67 |
| - runs-on: ubuntu-latest |
68 |
| - steps: |
69 |
| - - uses: google-github-actions/release-please-action@v3 |
70 |
| - id: release |
71 |
| - with: |
72 |
| - release-type: simple |
73 |
| - package-name: trouble.nvim |
74 |
| - - uses: actions/checkout@v3 |
75 |
| - - name: tag stable versions |
76 |
| - if: ${{ steps.release.outputs.release_created }} |
77 |
| - run: | |
78 |
| - git config user.name github-actions[bot] |
79 |
| - git config user.email github-actions[bot]@users.noreply.github.com |
80 |
| - git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git" |
81 |
| - git tag -d stable || true |
82 |
| - git push origin :stable || true |
83 |
| - git tag -a stable -m "Last Stable Release" |
84 |
| - git push origin stable |
| 9 | + ci: |
| 10 | + uses: folke/github/.github/workflows/ci.yml@main |
| 11 | + secrets: inherit |
| 12 | + with: |
| 13 | + plugin: trouble.nvim |
| 14 | + repo: folke/trouble.nvim |
| 15 | + tests: true |
0 commit comments