Skip to content
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
25 changes: 25 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Codecov configuration for task-engine
# https://docs.codecov.com/docs/codecovyml-reference

# Exclude example tasks and test files from coverage
ignore:
- "tasks/example_*.go"
- "**/*_test.go"
- "mocks/"
- ".github/"
- "docs/"

# Coverage settings
coverage:
precision: 2
round: down
range: 80..100
status:
project:
default:
target: 80%
threshold: 5%
patch:
default:
target: 80%
threshold: 5%
9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,7 @@ jobs:
- name: Run golangci-lint
run: make lint

- name: Run unit tests only (macOS)
if: matrix.os == 'macos-latest'
run: make test-unit-ci

- name: Run all tests (Ubuntu)
if: matrix.os == 'ubuntu-latest'
- name: Run tests
run: make test-ci

- name: Run tests with coverage
Expand All @@ -83,7 +78,7 @@ jobs:
uses: codecov/test-results-action@v1
with:
fail_ci_if_error: true
files: ./junit-unit.xml, ./junit-e2e.xml
files: ./junit-unit.xml
name: task-engine-tests
token: ${{ secrets.CODECOV_TOKEN }}

Expand Down
44 changes: 32 additions & 12 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,44 @@
version: "2"

run:
timeout: 5m

linters:
enable:
disable:
- errcheck
- gosimple
- gosec
enable:
- govet
- ineffassign
- staticcheck
- typecheck
- unused
- gofmt
- goimports
- goconst
- gocritic
- gosec
- misspell
- unconvert
- unparam
exclusions:
rules:
- path: '(.+)_test\.go'
linters:
- errcheck
- gosec
- ineffassign
- unparam
- goconst
- gocritic
- misspell
- staticcheck
- path: "mocks/.*"
linters:
- errcheck
- gosec
- unused
- unparam
- goconst
- gocritic
- misspell

run:
timeout: 5m

linters-settings:
goimports:
local-prefixes: github.com/ndizazzo/task_engine
issues:
max-issues-per-linter: 0
max-same-issues: 0
15 changes: 15 additions & 0 deletions .gosec
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"global": {
"nosec": "enabled"
},
"rules": {
"G304": {
"exclude": [
"actions/file/read_file_action.go",
"actions/file/copy_file_action.go",
"actions/file/write_file_action.go",
"actions/file/delete_path_action.go"
]
}
}
}
Loading
Loading