Skip to content

Commit

Permalink
ci(go): use make tool
Browse files Browse the repository at this point in the history
  • Loading branch information
danijelTxFusion committed Feb 23, 2024
1 parent ff81291 commit 04302cb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
docker-compose up -d
popd
- name: Run tests
run: cd go && go test ./test/...
run: cd go && make run-tests
2 changes: 1 addition & 1 deletion .github/workflows/test-js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run tests
name: Run tests JS
on:
workflow_dispatch:
pull_request:
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,7 @@ jobs:
- name: Install Go
uses: actions/[email protected]
- name: Run gofmt
run: |
cd go
fmt_output=$(gofmt -l .)
if [ -n "$fmt_output" ]; then
echo "Code not formatted correctly:"
echo "$fmt_output"
exit 1
else
echo "Code is formatted correctly"
exit 0
fi
run: cd go && make check-format
lint-js:
name: Check code format for JavaScript
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions go/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

run-tests:
go test ./test -v

check-format:
cd scripts/ && ./check-format.sh && cd ../..

format:
gofmt -w .

0 comments on commit 04302cb

Please sign in to comment.