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

GitHub Actions #34

Merged
merged 2 commits into from
Mar 27, 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
27 changes: 27 additions & 0 deletions .github/workflows/golang.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
on: [push]

jobs:
golang:
runs-on: ubuntu-latest # we execute everything except make in docker anyway
name: GoLang Basics
steps:
- name: Checkout
uses: actions/checkout@v4
- name: FS Permissions
# workaround for permissions with contaner attempting to create directories
run: chmod 777 -R "$(pwd)"
- name: Dep
run: make dep
- name: Lint
run: make lint
- name: Unit Tests
run: make test
- name: Integration Tests
run: make integration
- name: Test Coverage
run: make coverage
- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
files: .coverage/combined.cover.out
token: ${{ secrets.CODECOV_TOKEN }}
138 changes: 0 additions & 138 deletions .golangci.yaml

This file was deleted.

15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
TAG := $(shell git rev-parse --short HEAD)
DIR := $(shell pwd -L)
SDCLI_VERSION :=v1.4.0
SDCLI_VERSION :=v1.5
SDCLI=docker run --rm -v "$(DIR):$(DIR)" -w "$(DIR)" asecurityteam/sdcli:$(SDCLI_VERSION)


Expand Down
6 changes: 6 additions & 0 deletions messageparser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ func TestSetField(t *testing.T) {
if ok {
assert.IsType(t, tt.expectedError, setField(&testObject, tt.field, tt.value))
} else {
// this will be fixed with switch to https://tip.golang.org/doc/go1.22 with new variables per loop iteration
// #nosec G601
assert.IsType(t, tt.expectedError, setField(&tt.object, tt.field, tt.value))

}
Expand Down Expand Up @@ -403,6 +405,8 @@ func TestAppendToSlice(t *testing.T) {
if ok {
assert.IsType(t, tt.expectedError, appendToSlice(&testObject, tt.field, tt.value))
} else {
// this will be fixed with switch to https://tip.golang.org/doc/go1.22 with new variables per loop iteration
// #nosec G601
assert.IsType(t, tt.expectedError, appendToSlice(&tt.object, tt.field, tt.value))

}
Expand Down Expand Up @@ -468,6 +472,8 @@ func TestAddToMap(t *testing.T) {
if ok {
assert.IsType(t, tt.expectedError, addToMap(&testObject, tt.field, "key", tt.value))
} else {
// this will be fixed with switch to https://tip.golang.org/doc/go1.22 with new variables per loop iteration
// #nosec G601
assert.IsType(t, tt.expectedError, addToMap(&tt.object, tt.field, "key", tt.value))
}
})
Expand Down