Skip to content

Commit

Permalink
fix: simplify lint and format workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lamchau committed Aug 21, 2024
1 parent 725e21c commit f776ed2
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 129 deletions.
62 changes: 0 additions & 62 deletions .github/workflows/format.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/lint.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/trigger-lint.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/validate-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: validate-json
on:
push:
branches:
- "**"

pull_request:
types:
- opened
- synchronize

jobs:
format:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v4

- uses: cashapp/activate-hermit@v1
name: setup hermit with `just` and `jq`
with:
cache: true

- name: format json files
id: format-json
run: just format
1 change: 1 addition & 0 deletions bin/.just-1.34.0.pkg
1 change: 1 addition & 0 deletions bin/just
4 changes: 1 addition & 3 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env bash

if just lint; then
echo "[success] linting passed"
else
if ! just format; then
echo "[error] linting failed"
exit 1
fi

0 comments on commit f776ed2

Please sign in to comment.