Skip to content

Commit cfec90b

Browse files
authored
ci: use github actions
Signed-off-by: GitHub <noreply@github.com>
1 parent 060996e commit cfec90b

File tree

4 files changed

+40
-3
lines changed

4 files changed

+40
-3
lines changed

.github/workflows/go.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build Symmecrypt
2+
on: [push]
3+
jobs:
4+
Build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v4
8+
- uses: actions/setup-go@v5
9+
with:
10+
go-version: 'stable'
11+
- run: make test
12+
- run: >
13+
for GOOS in darwin linux windows; do
14+
for GOARCH in amd64 arm64; do
15+
make build GOOS=${GOOS} GOARCH=${GOARCH}
16+
done
17+
done
18+
- name: golangci-lint
19+
uses: golangci/golangci-lint-action@v6
20+
with:
21+
version: v1.59

.gitignore

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
Test*
2-
vendor/
3-
cmd/symmecrypt/symmecrypt
1+
dist/
2+
cover.out

Makefile

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
BINARY_NAME=symmecrypt
2+
3+
all: run
4+
5+
build:
6+
GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 go build -o dist/${BINARY_NAME}-${GOOS}-${GOARCH} cmd/symmecrypt/main.go
7+
8+
test:
9+
go test -v -coverprofile cover.out -race ./...
10+
11+
run:
12+
go run cmd/symmecrypt/main.go
13+
14+
clean:
15+
rm -rf dist

TODO

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- golangci-lint
2+
- codecoverage

0 commit comments

Comments
 (0)