Skip to content

Commit c3bc7a3

Browse files
author
MeihaoZuyu
committed
feat: enable CI and it rocks
Signed-off-by: MeihaoZuyu <anqur@riema.xyz>
1 parent 9f8ab7d commit c3bc7a3

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- main
5+
push:
6+
branches:
7+
- main
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-go@v5
16+
- name: Build
17+
run: make ci

Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,11 @@ packages/${SDK}/${EXEC}.wasm: packages/${SDK}/wasm_exec.js
2525

2626
.PHONY: fmt
2727
fmt:
28-
goimports -w .
28+
go run github.com/RiemaLabs/nubit-ci/cmd/nubitci-lint@latest -only go-format -w
2929

3030
.PHONY: ci
3131
ci:
32-
test -z "$(goimports -l .)" || (echo "⚠️ Run \`make fmt\` to format these files:" && goimports -l . && exit 1)
33-
if [ -n "$$(golangci-lint run)" ]; then \
34-
echo "⚠️ Please fix those errors:" && golangci-lint run --show-stats && exit 1; \
35-
else \
36-
echo "✅ Passed import and lint check!"; \
37-
fi
32+
go run github.com/RiemaLabs/nubit-ci/cmd/nubitci-lint@latest
3833

3934
.PHONY: clean
4035
clean:

0 commit comments

Comments
 (0)