Skip to content

Commit

Permalink
refactor!: ci and check
Browse files Browse the repository at this point in the history
  • Loading branch information
Diogo-ss committed Apr 11, 2024
1 parent eecdd33 commit 77b4cf7
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 49 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: check

on:
push:
branches-ignore:
- main
paths:
- "lua/**/*.lua"
pull_request:
paths:
- "lua/**/*.lua"
workflow_call:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Create Luacheck config
run: echo 'globals = { "vim" }' > .luacheckrc

- name: Luacheck
uses: lunarmodules/luacheck@v1
with:
args: .

- name: Stylua check
uses: JohnnyMorganz/stylua-action@v4
with:
token: ${{ secrets.GH_TOKEN }}
version: latest
args: --color always --check lua/
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: ci
on:
push:
paths-ignore:
- ".github/**"
- ".stylua.toml"
- ".gitignore"
branches:
- main
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4

- name: create luacheck config
run: echo 'globals = { "vim" }' > .luacheckrc

- name: luacheck
uses: lunarmodules/luacheck@v1
with:
args: .

- name: stylua check
uses: johnnymorganz/stylua-action@v4
with:
token: ${{ secrets.GH_TOKEN }}
version: latest
args: --color always --check lua/

release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: check
steps:
- name: checkout
uses: actions/checkout@v4

- name: create release
uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.GH_TOKEN }}
release-type: simple
49 changes: 0 additions & 49 deletions .github/workflows/format.yml

This file was deleted.

0 comments on commit 77b4cf7

Please sign in to comment.