Skip to content

Commit 46a4cbb

Browse files
authored
Develop (#2)
Added watcher and a lot of ci stuff
1 parent 079aaf1 commit 46a4cbb

35 files changed

Lines changed: 715 additions & 344 deletions

File tree

.devcontainer/.env

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

.devcontainer/Dockerfile

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

.devcontainer/devcontainer.json

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

.devcontainer/docker-compose.yml

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

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.go text eol=lf

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
paths: ["**.go", "go.mod", ".github/workflows/*"]
6+
7+
jobs:
8+
build:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
go:
13+
- "1.19"
14+
runs-on: macos-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 1
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v3
23+
with:
24+
go-version: ${{ matrix.go }}
25+
26+
- name: Run GoReleaser
27+
uses: goreleaser/goreleaser-action@v3
28+
with:
29+
version: latest
30+
args: release --snapshot --rm-dist

.github/workflows/go.yml

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

.github/workflows/lint.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Lint
2+
on:
3+
push:
4+
paths: ["**.go", "go.mod", ".github/workflows/*"]
5+
6+
jobs:
7+
lint:
8+
name: "lint"
9+
runs-on: ubuntu-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
go:
14+
- "1.19"
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 1
20+
21+
- name: setup Go
22+
uses: actions/setup-go@v3
23+
with:
24+
go-version: ${{ matrix.go }}
25+
26+
- name: Run linters
27+
uses: golangci/golangci-lint-action@v3
28+
with:
29+
version: latest
30+
31+
- name: Go vet
32+
run: "go vet ./..."
33+
34+
- name: Staticcheck
35+
uses: dominikh/staticcheck-action@master
36+
with:
37+
version: "2022.1"
38+
install-go: false
39+
cache-key: ${{ matrix.go }}

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
on:
2+
push:
3+
tags:
4+
- "v*"
5+
6+
name: Upload release assets after tagging
7+
jobs:
8+
build:
9+
name: Create assets
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
os:
14+
- macos-latest
15+
go:
16+
- "1.19"
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 1
23+
24+
- name: Install Go
25+
uses: actions/setup-go@v3
26+
with:
27+
go-version: ${{ matrix.go }}
28+
29+
- name: Run GoReleaser
30+
uses: goreleaser/goreleaser-action@v3
31+
with:
32+
version: latest
33+
args: release --rm-dist
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
test:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
- windows-latest
17+
- macos-latest
18+
go:
19+
- "1.19"
20+
runs-on: ${{ matrix.os }}
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v3
24+
with:
25+
fetch-depth: 1
26+
27+
- name: setup Go
28+
uses: actions/setup-go@v3
29+
with:
30+
go-version: ${{ matrix.go }}
31+
32+
- name: test
33+
run: |
34+
go test -v -race ./...
35+
36+
coverage:
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
os:
41+
- ubuntu-latest
42+
go:
43+
- "1.19"
44+
runs-on: ${{ matrix.os }}
45+
steps:
46+
- name: Checkout code
47+
uses: actions/checkout@v3
48+
with:
49+
fetch-depth: 1
50+
51+
- name: Install Go
52+
uses: actions/setup-go@v3
53+
with:
54+
go-version: ${{ matrix.go }}
55+
56+
- name: Calc coverage
57+
run: |
58+
go test -v -covermode=count -coverprofile=coverage.out -coverpkg ./pkg/... ./...
59+
- name: Convert coverage.out to coverage.lcov
60+
uses: jandelgado/gcov2lcov-action@master
61+
- name: Coveralls
62+
uses: coverallsapp/github-action@master
63+
with:
64+
github-token: ${{ secrets.GITHUB_TOKEN }}
65+
path-to-lcov: coverage.lcov

0 commit comments

Comments
 (0)