Skip to content

Commit 66f8085

Browse files
committed
fix: unit test and coverage
1 parent 2e15255 commit 66f8085

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
6363
- name: Unit Tests
6464
run: |
65-
eirctl run unit:test:run
65+
eirctl run pipeline gha:unit:test
6666
6767
- name: Publish Test Report
6868
uses: mikepenz/action-junit-report@v6
@@ -82,3 +82,5 @@ jobs:
8282
projectBaseDir: .
8383
args: >
8484
-Dsonar.projectVersion=${{ needs.set-version.outputs.semVer }}
85+
-Dsonar.working.directory=.scannerwork
86+
-Dsonar.scm.provider=git

eirctl.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ pipelines:
1717
- task: build:win
1818
depends_on: build:unix
1919

20+
gha:unit:test:
21+
- pipeline: unit:test:run
22+
- task: sonar:coverage:prep
23+
depends_on: test:unit
24+
2025
unit:test:run:
2126
- task: unit:test:prereqs
2227
- task: unit:test
@@ -142,3 +147,13 @@ tasks:
142147
build:container:
143148
description: Builds the docker image
144149
command: docker build --build-arg Version={{.Version}} --build-arg Revision={{.Revision}} -t eirctl:{{.Version}} .
150+
151+
sonar:coverage:prep:
152+
context: bash
153+
command:
154+
- |
155+
sed -i 's|github.com/DevLabFoundry/aws-cli-auth||g' .coverage/out
156+
echo "Coverage file first 20 lines after conversion:"
157+
head -20 .coverage/out
158+
echo "Coverage file line count:"
159+
wc -l .coverage/out

go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/DevLabFoundry/aws-cli-auth
22

3-
go 1.25.5
3+
go 1.25
4+
5+
toolchain go1.25.7
46

57
require (
68
github.com/aws/aws-sdk-go-v2 v1.39.6

0 commit comments

Comments
 (0)