Skip to content

Commit 750bf92

Browse files
committed
adds GHA & Makefile configs
1 parent b2c246b commit 750bf92

File tree

13 files changed

+224
-136
lines changed

13 files changed

+224
-136
lines changed

.circleci/config.yml

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

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
; https://editorconfig.org/
2+
3+
root = true
4+
5+
[*]
6+
insert_final_newline = true
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
indent_style = space
10+
indent_size = 2
11+
12+
[{Makefile,go.mod,go.sum,*.go,.gitmodules}]
13+
indent_style = tab
14+
indent_size = 4
15+
16+
[*.md]
17+
indent_size = 4
18+
trim_trailing_whitespace = false
19+
20+
eclint_indent_style = unset

.github/release-drafter.yml

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

.github/workflows/issues.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add all the issues created to the project.
2+
name: Add issue or pull request to Project
3+
4+
on:
5+
issues:
6+
types:
7+
- opened
8+
pull_request_target:
9+
types:
10+
- opened
11+
- reopened
12+
13+
jobs:
14+
add-to-project:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Add issue to project
18+
uses: actions/add-to-project@v0.5.0
19+
with:
20+
project-url: https://github.com/orgs/gorilla/projects/4
21+
github-token: ${{ secrets.ADD_TO_PROJECT_TOKEN }}

.github/workflows/security.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Security
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
permissions:
10+
contents: read
11+
jobs:
12+
scan:
13+
strategy:
14+
matrix:
15+
go: ['1.20','1.21']
16+
fail-fast: true
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout Code
20+
uses: actions/checkout@v3
21+
22+
- name: Setup Go ${{ matrix.go }}
23+
uses: actions/setup-go@v4
24+
with:
25+
go-version: ${{ matrix.go }}
26+
cache: false
27+
28+
- name: Run GoSec
29+
uses: securego/gosec@master
30+
with:
31+
args: -exclude-dir examples ./...
32+
33+
- name: Run GoVulnCheck
34+
uses: golang/govulncheck-action@v1
35+
with:
36+
go-version-input: ${{ matrix.go }}
37+
go-package: ./...

.github/workflows/test.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
permissions:
10+
contents: read
11+
jobs:
12+
unit:
13+
strategy:
14+
matrix:
15+
go: ['1.20','1.21']
16+
os: [ubuntu-latest, macos-latest, windows-latest]
17+
fail-fast: true
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- name: Checkout Code
21+
uses: actions/checkout@v3
22+
23+
- name: Setup Go ${{ matrix.go }}
24+
uses: actions/setup-go@v4
25+
with:
26+
go-version: ${{ matrix.go }}
27+
cache: false
28+
29+
- name: Run Tests
30+
run: go test -race -cover -coverprofile=coverage -covermode=atomic -v ./...
31+
32+
- name: Upload coverage to Codecov
33+
uses: codecov/codecov-action@v3
34+
with:
35+
files: ./coverage

.github/workflows/verify.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Verify
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
permissions:
10+
contents: read
11+
jobs:
12+
lint:
13+
strategy:
14+
matrix:
15+
go: ['1.20','1.21']
16+
fail-fast: true
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout Code
20+
uses: actions/checkout@v3
21+
22+
- name: Setup Go ${{ matrix.go }}
23+
uses: actions/setup-go@v4
24+
with:
25+
go-version: ${{ matrix.go }}
26+
cache: false
27+
28+
- name: Run GolangCI-Lint
29+
uses: golangci/golangci-lint-action@v3
30+
with:
31+
version: v1.53

.gitignore

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1 @@
1-
# Compiled Object files, Static and Dynamic libs (Shared Objects)
2-
*.o
3-
*.a
4-
*.so
5-
6-
# Folders
7-
_obj
8-
_test
9-
10-
# Architecture specific extensions/prefixes
11-
*.[568vq]
12-
[568vq].out
13-
14-
*.cgo1.go
15-
*.cgo2.c
16-
_cgo_defun.c
17-
_cgo_gotypes.go
18-
_cgo_export.*
19-
20-
_testmain.go
21-
22-
*.exe
23-
24-
.idea/
25-
*.iml
1+
coverage.coverprofile

.golangci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
run:
2+
timeout: "5m"
3+
# will not run golangci-lint against *_test.go
4+
tests: false
5+
issues:
6+
exclude-dirs:
7+
- examples/*.go
8+
exclude-rules:
9+
# excluding error checks from all the .go files
10+
- path: ./*.go
11+
linters:
12+
- errcheck
13+

AUTHORS

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

0 commit comments

Comments
 (0)