Skip to content

Commit

Permalink
Merge pull request #34 from asecurityteam/github-actions
Browse files Browse the repository at this point in the history
GitHub Actions
  • Loading branch information
ensary authored Mar 27, 2024
2 parents c5717cf + 4c04237 commit b93601c
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 154 deletions.
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

0 comments on commit b93601c

Please sign in to comment.