Skip to content

Commit

Permalink
chore: add lint workflow
Browse files Browse the repository at this point in the history
Signed-off-by: giac-mysten <[email protected]>
  • Loading branch information
giac-mysten committed Jun 17, 2024
1 parent 8b57102 commit e980fb6
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ max_line_length = 150
indent_size = unset

# Ignore paths
[{.git/**/*,**/*.lock,**/Move.toml,LICENSE,**/*.html,**/*.css}]
[{.git/**/*,**/*.lock,**/Move.toml,LICENSE,**/*.html,**/*.css,**/*.json}]
charset = unset
end_of_line = unset
indent_size = unset
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Lint

on: [pull_request]

permissions:
contents: read

jobs:
pr-title:
runs-on: ubuntu-latest
name: Check PR title format
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check PR title
uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

editorconfig:
runs-on: ubuntu-latest
name: Check editorconfig
steps:
- uses: actions/checkout@v4
- run: pip install editorconfig-checker=="2.7.3"
- run: ec

typos:
runs-on: ubuntu-latest
name: Check spelling
steps:
- uses: actions/checkout@v4
- uses: crate-ci/[email protected]

license-headers:
runs-on: ubuntu-latest
name: Check license headers
steps:
- uses: actions/checkout@v4
- run: cargo install [email protected]
- run: licensesnip check

check-all:
name: Check if all lint jobs succeeded
if: always()
needs:
- pr-title
- editorconfig
- typos
- license-headers
runs-on: ubuntu-latest
steps:
- name: Decide whether all needed jobs succeeded
uses: re-actors/[email protected]
with:
jobs: ${{ toJSON(needs) }}
4 changes: 0 additions & 4 deletions portal/.prettierrc

This file was deleted.

0 comments on commit e980fb6

Please sign in to comment.