Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run checks against pull requests #3

Merged
merged 4 commits into from
Feb 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,29 @@ jobs:
permissions:
contents: write
steps:
- run: sudo add-apt-repository ppa:neovim-ppa/stable
- run: sudo apt-get update
- run: sudo apt-get install -y bash neovim pandoc
- run: rustup toolchain install stable --profile minimal --no-self-update
- run: cargo install garden-tools
- run: cargo install stylua
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- run: sudo add-apt-repository ppa:neovim-ppa/stable
- run: sudo apt-get update
- run: sudo apt-get install -y bash neovim pandoc
- run: date +%W >weekly
- name: Restore cache
id: cache
uses: actions/cache@v2
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-${{ hashFiles('weekly') }}
- run: rm -f weekly
- name: Install
if: steps.cache.outputs.cache-hit != 'true'
run: |
rustup toolchain install stable --profile minimal --no-self-update
cargo install garden-tools
cargo install stylua
- name: Generate docs
uses: kdheepak/panvimdoc@main
with:
Expand All @@ -26,12 +39,12 @@ jobs:
pandoc: README.md
toc: 'false'
- run: garden -vv doc/post
- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_author: cowcat <cowcat@localhost>
commit_message: 'doc: generate vim docs'
- run: garden -vv fmt
- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_author: fatcat <fatcat@localhost>
commit_message: 'lua: code formatting'
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test
on: [pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- run: sudo apt-get update
- run: sudo apt-get install luarocks -y
- run: sudo luarocks install luacheck
- run: date +%W >weekly
- name: Restore cache
id: cache
uses: actions/cache@v2
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-${{ hashFiles('weekly') }}
- run: rm -f weekly
- name: Install
if: steps.cache.outputs.cache-hit != 'true'
run: |
rustup toolchain install stable --profile minimal --no-self-update
cargo install garden-tools
cargo install stylua
- run: garden -vv check
4 changes: 2 additions & 2 deletions garden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ trees:
check>:
- check/lua
- check/fmt
check/fmt: garden fmt -- --check
check/lua: luacheck lua/*
check/fmt: garden -vv fmt -- --check
check/lua: luacheck lua
doc: |
panvimdoc.sh \
--description ' Telescope plugin for searching repositories using "git grep"' \
Expand Down
Loading