diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 93c6f6f..beb70b7 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -8,7 +8,7 @@ on: branches: - main paths-ignore: - - "example/**" + - example/** - "**/*.md" - "**/*.yaml" push: @@ -25,9 +25,16 @@ jobs: go-version: 1.22 - name: 🧹 Lint uses: golangci/golangci-lint-action@v4 + - name: Install dependencies + run: go install gotest.tools/gotestsum@latest - name: 🧪 Test - run: go test -race -coverprofile=coverage.out -covermode=atomic + run: gotestsum --junitfile junit.xml --format testdox -- -race -coverprofile=coverage.out -covermode=atomic - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 0cd0d15..55895f9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ +# ide +.vscode +.trunk + # tests coverage.out -coverage.html \ No newline at end of file +coverage.html +junit.xml \ No newline at end of file diff --git a/.trunk/.gitignore b/.trunk/.gitignore deleted file mode 100644 index 15966d0..0000000 --- a/.trunk/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -*out -*logs -*actions -*notifications -*tools -plugins -user_trunk.yaml -user.yaml -tmp diff --git a/.trunk/configs/.markdownlint.yaml b/.trunk/configs/.markdownlint.yaml deleted file mode 100644 index b40ee9d..0000000 --- a/.trunk/configs/.markdownlint.yaml +++ /dev/null @@ -1,2 +0,0 @@ -# Prettier friendly markdownlint config (all formatting rules disabled) -extends: markdownlint/style/prettier diff --git a/.trunk/configs/.yamllint.yaml b/.trunk/configs/.yamllint.yaml deleted file mode 100644 index 184e251..0000000 --- a/.trunk/configs/.yamllint.yaml +++ /dev/null @@ -1,7 +0,0 @@ -rules: - quoted-strings: - required: only-when-needed - extra-allowed: ["{|}"] - key-duplicates: {} - octal-values: - forbid-implicit-octal: true diff --git a/.trunk/configs/svgo.config.js b/.trunk/configs/svgo.config.js deleted file mode 100644 index b257d13..0000000 --- a/.trunk/configs/svgo.config.js +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = { - plugins: [ - { - name: "preset-default", - params: { - overrides: { - removeViewBox: false, // https://github.com/svg/svgo/issues/1128 - sortAttrs: true, - removeOffCanvasPaths: true, - }, - }, - }, - ], -}; diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml deleted file mode 100644 index cab4c39..0000000 --- a/.trunk/trunk.yaml +++ /dev/null @@ -1,40 +0,0 @@ -# This file controls the behavior of Trunk: https://docs.trunk.io/cli -# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml -version: 0.1 -cli: - version: 1.22.2 -# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins) -plugins: - sources: - - id: trunk - ref: v1.6.1 - uri: https://github.com/trunk-io/plugins -# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes) -runtimes: - enabled: - - go@1.21.0 -# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration) -lint: - ignore: - - linters: [ALL] - paths: - - examples/** - enabled: - - checkov@3.2.219 - - git-diff-check - - gofmt@1.20.4 - - golangci-lint@1.59.1 - - markdownlint@0.41.0 - - osv-scanner@1.8.3 - - prettier@3.3.3 - - svgo@3.3.2 - - trivy@0.54.1 - - trufflehog@3.81.7 - - yamllint@1.35.1 -actions: - disabled: - - trunk-announce - - trunk-check-pre-push - - trunk-fmt-pre-commit - enabled: - - trunk-upgrade-available diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 0d1185b..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Launch Package", - "type": "go", - "request": "launch", - "mode": "auto", - "program": "${fileDirname}" - } - ] -} \ No newline at end of file