Skip to content

Commit

Permalink
ci: add a github action to lint and test PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
moyiz committed May 11, 2024
1 parent 95a2d10 commit 037740a
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Lint and Test
on:
- pull_request
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- if: env.ACT == 'true'
run: |
apt-get update && apt-get install -y unzip && apt-get clean
- uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: "latest"
args: --check .
test:
runs-on: ubuntu-latest
steps:
- name: Install Neovim
uses: rhysd/action-setup-vim@v1
with:
neovim: true
- uses: actions/checkout@v4
- if: env.ACT == 'true'
run: |
apt-get update
apt-get install -y make git
apt-get clean
- run: |
make test

0 comments on commit 037740a

Please sign in to comment.