Skip to content

Commit

Permalink
Drop Travis, Enable GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ensary committed Mar 21, 2024
1 parent 47edad8 commit 4c04237
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 153 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.

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 4c04237

Please sign in to comment.