Skip to content

Commit 2f085c8

Browse files
committed
build: add Makefile
1 parent 778d161 commit 2f085c8

File tree

6 files changed

+27
-22
lines changed

6 files changed

+27
-22
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/setup-go@v5
1919
with:
2020
go-version-file: ./go.mod
21-
- run: ./ci/fmt.sh
21+
- run: make fmt
2222

2323
lint:
2424
runs-on: ubuntu-latest
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/setup-go@v5
2929
with:
3030
go-version-file: ./go.mod
31-
- run: ./ci/lint.sh
31+
- run: make lint
3232

3333
test:
3434
runs-on: ubuntu-latest
@@ -43,7 +43,7 @@ jobs:
4343
- uses: actions/setup-go@v5
4444
with:
4545
go-version-file: ./go.mod
46-
- run: ./ci/test.sh
46+
- run: make test
4747
- uses: actions/upload-artifact@v4
4848
with:
4949
name: coverage.html
@@ -56,4 +56,4 @@ jobs:
5656
- uses: actions/setup-go@v5
5757
with:
5858
go-version-file: ./go.mod
59-
- run: ./ci/bench.sh
59+
- run: make bench

.github/workflows/daily.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/setup-go@v5
1616
with:
1717
go-version-file: ./go.mod
18-
- run: AUTOBAHN=1 ./ci/bench.sh
18+
- run: AUTOBAHN=1 make bench
1919
test:
2020
runs-on: ubuntu-latest
2121
steps:
@@ -29,7 +29,7 @@ jobs:
2929
- uses: actions/setup-go@v5
3030
with:
3131
go-version-file: ./go.mod
32-
- run: AUTOBAHN=1 ./ci/test.sh
32+
- run: AUTOBAHN=1 make test
3333
- uses: actions/upload-artifact@v4
3434
with:
3535
name: coverage.html
@@ -43,7 +43,7 @@ jobs:
4343
- uses: actions/setup-go@v5
4444
with:
4545
go-version-file: ./go.mod
46-
- run: AUTOBAHN=1 ./ci/bench.sh
46+
- run: AUTOBAHN=1 make bench
4747
test-dev:
4848
runs-on: ubuntu-latest
4949
steps:
@@ -59,7 +59,7 @@ jobs:
5959
- uses: actions/setup-go@v5
6060
with:
6161
go-version-file: ./go.mod
62-
- run: AUTOBAHN=1 ./ci/test.sh
62+
- run: AUTOBAHN=1 make test
6363
- uses: actions/upload-artifact@v4
6464
with:
6565
name: coverage-dev.html

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
go-version-file: ./go.mod
3939
- name: Generate coverage and badge
4040
run: |
41-
./ci/test.sh
41+
make test
4242
mkdir -p ./ci/out/static
4343
cp ./ci/out/coverage.html ./ci/out/static/coverage.html
4444
percent=$(go tool cover -func ./ci/out/coverage.prof | tail -n1 | awk '{print $3}' | tr -d '%')

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.PHONY: all
2+
all: fmt lint test
3+
4+
.PHONY: fmt
5+
fmt:
6+
./ci/fmt.sh
7+
8+
.PHONY: lint
9+
lint:
10+
./ci/lint.sh
11+
12+
.PHONY: test
13+
test:
14+
./ci/test.sh
15+
16+
.PHONY: bench
17+
bench:
18+
./ci/bench.sh

ci/lint.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/sh
2-
set -x
32
set -eu
43
cd -- "$(dirname "$0")/.."
54

make.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy