Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to shared workflows + linter fix #39

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 0 additions & 67 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/include.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Same as full workflow (eg from fortio/multicurl) but without the goreleaser step
name: "Shared library fortio workflows"

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
call-gochecks:
uses: fortio/workflows/.github/workflows/gochecks.yml@main
# call-codecov:
# uses: fortio/workflows/.github/workflows/codecov.yml@main
call-codeql:
uses: fortio/workflows/.github/workflows/codeql-analysis.yml@main
permissions:
actions: read
contents: read
security-events: write
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.golangci.yml
# Binaries for programs and plugins
*.exe
*.exe~
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

lint: .golangci.yml
golangci-lint run

.golangci.yml: Makefile
curl -fsS -o .golangci.yml https://raw.githubusercontent.com/fortio/workflows/main/golangci.yml

.PHONY: lint
4 changes: 2 additions & 2 deletions assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func Assert(t *testing.T, cond bool, msg string, rest ...interface{}) {

type hasT interface {
T() *testing.T
SetT(*testing.T)
SetT(t *testing.T)
}

// TestSuite to be used as base struct for test suites.
Expand Down Expand Up @@ -162,7 +162,7 @@ func Run(t *testing.T, suite hasT) {
}
test := testing.InternalTest{
Name: method.Name,
F: func(t *testing.T) {
F: func(_ *testing.T) {
method.Func.Call([]reflect.Value{reflect.ValueOf(suite)})
},
}
Expand Down
Loading