From 3898c3d0c186404a95a8822741413cd4d1907687 Mon Sep 17 00:00:00 2001 From: mirackara Date: Tue, 30 May 2023 12:53:18 -0500 Subject: [PATCH 01/15] codecov github action --- .github/workflows/codecov.yaml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/workflows/codecov.yaml diff --git a/.github/workflows/codecov.yaml b/.github/workflows/codecov.yaml new file mode 100644 index 000000000..c5d60f393 --- /dev/null +++ b/.github/workflows/codecov.yaml @@ -0,0 +1,3 @@ +- name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From e3b35acf6dc17a99fb4d68aecb6a3b2c52ea0102 Mon Sep 17 00:00:00 2001 From: mirackara Date: Tue, 30 May 2023 13:04:13 -0500 Subject: [PATCH 02/15] codecov in ci.yaml --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 00af08d15..5db6a08bf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -167,6 +167,9 @@ jobs: EXTRATESTING: ${{ matrix.extratesting }} PIN: ${{ matrix.pin }} + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + go-agent-arm64: # Run all unit tests on aarch64 emulator to ensure compatibility with AWS # Graviton instances From a91eaa8eb811cb37960a9655d44a361ad8c442d0 Mon Sep 17 00:00:00 2001 From: mirackara Date: Tue, 30 May 2023 13:13:19 -0500 Subject: [PATCH 03/15] added coverageprofile --- .github/workflows/ci.yaml | 3 +++ v3/build-script.sh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5db6a08bf..a004abee2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -169,6 +169,9 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 + with: + file: ./coverage.txt + go-agent-arm64: # Run all unit tests on aarch64 emulator to ensure compatibility with AWS diff --git a/v3/build-script.sh b/v3/build-script.sh index a31526afb..248f407cf 100755 --- a/v3/build-script.sh +++ b/v3/build-script.sh @@ -51,6 +51,10 @@ for dir in $DIRS; do go test -race -benchtime=1ms -bench=. ./... go vet ./... verify_go_fmt + + # generate coverprofile + go test -v -coverprofile=coverage.txt ./... + # Test again against the latest version of the dependencies to ensure that # our instrumentation is up to date. TODO: Perhaps it is possible to From d02964225f19f51d85a9c528b88b6ef3b532f7c5 Mon Sep 17 00:00:00 2001 From: mirackara Date: Tue, 30 May 2023 13:14:16 -0500 Subject: [PATCH 04/15] delete codecov yaml --- .github/workflows/ci.yaml | 1 + .github/workflows/codecov.yaml | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 .github/workflows/codecov.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a004abee2..9460f5129 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -169,6 +169,7 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 + env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: file: ./coverage.txt diff --git a/.github/workflows/codecov.yaml b/.github/workflows/codecov.yaml deleted file mode 100644 index c5d60f393..000000000 --- a/.github/workflows/codecov.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file From f6f85f9f6282b6fc701a7e0909087595e0299c51 Mon Sep 17 00:00:00 2001 From: mirackara Date: Tue, 30 May 2023 13:15:39 -0500 Subject: [PATCH 05/15] formatting fix --- .github/workflows/ci.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9460f5129..ee3461ff8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -169,9 +169,10 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 - env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: - file: ./coverage.txt + file: ./coverage.txt go-agent-arm64: From 5c93d091f01b12f11aaba5dc2481a9137955c04d Mon Sep 17 00:00:00 2001 From: mirackara Date: Tue, 30 May 2023 13:19:20 -0500 Subject: [PATCH 06/15] typo fix --- v3/build-script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3/build-script.sh b/v3/build-script.sh index 248f407cf..e49ed2740 100755 --- a/v3/build-script.sh +++ b/v3/build-script.sh @@ -53,7 +53,7 @@ for dir in $DIRS; do verify_go_fmt # generate coverprofile - go test -v -coverprofile=coverage.txt ./... + go test -v -coverprofile=coverage.txt # Test again against the latest version of the dependencies to ensure that From 2565518d322cb506c89e316f9c8509adeae51842 Mon Sep 17 00:00:00 2001 From: mirackara Date: Tue, 30 May 2023 13:28:02 -0500 Subject: [PATCH 07/15] save coverprofile to root of directory --- .github/workflows/ci.yaml | 8 +------- v3/build-script.sh | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ee3461ff8..56459cd50 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -166,14 +166,8 @@ jobs: DIRS: ${{ matrix.dirs }} EXTRATESTING: ${{ matrix.extratesting }} PIN: ${{ matrix.pin }} - - - name: Upload coverage reports to Codecov + - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - file: ./coverage.txt - go-agent-arm64: # Run all unit tests on aarch64 emulator to ensure compatibility with AWS diff --git a/v3/build-script.sh b/v3/build-script.sh index e49ed2740..177b8c21b 100755 --- a/v3/build-script.sh +++ b/v3/build-script.sh @@ -52,9 +52,9 @@ for dir in $DIRS; do go vet ./... verify_go_fmt - # generate coverprofile - go test -v -coverprofile=coverage.txt + # generate coverprofile + go test ./... -race -coverprofile=coverage.out -covermode=atomic # Test again against the latest version of the dependencies to ensure that # our instrumentation is up to date. TODO: Perhaps it is possible to From fdec9f64d36a6ce840f8d007787d4d110fafb5b1 Mon Sep 17 00:00:00 2001 From: mirackara Date: Tue, 30 May 2023 14:39:45 -0500 Subject: [PATCH 08/15] added additional flags --- v3/build-script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3/build-script.sh b/v3/build-script.sh index 177b8c21b..956142d07 100755 --- a/v3/build-script.sh +++ b/v3/build-script.sh @@ -54,7 +54,7 @@ for dir in $DIRS; do # generate coverprofile - go test ./... -race -coverprofile=coverage.out -covermode=atomic + go test ./... -coverprofile=coverage.out -covermode=count -coverpkg= ./... # Test again against the latest version of the dependencies to ensure that # our instrumentation is up to date. TODO: Perhaps it is possible to From b8a1bab2b09aff8e918b6574038177ae430661ab Mon Sep 17 00:00:00 2001 From: mirackara Date: Tue, 30 May 2023 17:31:12 -0500 Subject: [PATCH 09/15] ignore optional methods --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 56459cd50..0204c9c0c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -168,6 +168,7 @@ jobs: PIN: ${{ matrix.pin }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 + ignore: "v3/newrelic/sql_driver_optional_methods.go" go-agent-arm64: # Run all unit tests on aarch64 emulator to ensure compatibility with AWS From 4c13a70a323f4e5ac7cd7ab1ac20bae73be1d247 Mon Sep 17 00:00:00 2001 From: mirackara Date: Tue, 30 May 2023 17:33:17 -0500 Subject: [PATCH 10/15] format fix --- .github/workflows/ci.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0204c9c0c..4b233852d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -168,7 +168,8 @@ jobs: PIN: ${{ matrix.pin }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 - ignore: "v3/newrelic/sql_driver_optional_methods.go" + ignore: + - "v3/newrelic/sql_driver_optional_methods.go" go-agent-arm64: # Run all unit tests on aarch64 emulator to ensure compatibility with AWS From 251acf9ef36df24f5fdddfabaa6de1ac28fd999f Mon Sep 17 00:00:00 2001 From: mirackara Date: Tue, 30 May 2023 17:35:18 -0500 Subject: [PATCH 11/15] add codecov yaml file --- .github/workflows/ci.yaml | 2 -- .github/workflows/codecov.yml | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4b233852d..56459cd50 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -168,8 +168,6 @@ jobs: PIN: ${{ matrix.pin }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 - ignore: - - "v3/newrelic/sql_driver_optional_methods.go" go-agent-arm64: # Run all unit tests on aarch64 emulator to ensure compatibility with AWS diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 000000000..88c6d11b9 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,2 @@ + ignore: + - "v3/newrelic/sql_driver_optional_methods.go" \ No newline at end of file From 798ac8549363a36e851ae6575d529c05041f4ecd Mon Sep 17 00:00:00 2001 From: mirackara Date: Thu, 1 Jun 2023 10:16:30 -0500 Subject: [PATCH 12/15] move codecov yml file --- .github/workflows/codecov.yml => codecov.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/codecov.yml => codecov.yml (100%) diff --git a/.github/workflows/codecov.yml b/codecov.yml similarity index 100% rename from .github/workflows/codecov.yml rename to codecov.yml From c26f39b465ed959713a0981385d8d8a8a68ba80c Mon Sep 17 00:00:00 2001 From: mirackara Date: Fri, 9 Jun 2023 10:11:53 -0500 Subject: [PATCH 13/15] ignore file name --- codecov.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codecov.yml b/codecov.yml index 88c6d11b9..121d0007f 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,2 +1,2 @@ - ignore: - - "v3/newrelic/sql_driver_optional_methods.go" \ No newline at end of file +ignore: + - "**/sql_driver_optional_methods.go" \ No newline at end of file From 3cc5fa5973b47d76d983938138ede1653af1e89a Mon Sep 17 00:00:00 2001 From: mirackara Date: Fri, 9 Jun 2023 10:40:13 -0500 Subject: [PATCH 14/15] attempting to remove file via bash command... --- v3/build-script.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/v3/build-script.sh b/v3/build-script.sh index 956142d07..ee85bb008 100755 --- a/v3/build-script.sh +++ b/v3/build-script.sh @@ -55,7 +55,10 @@ for dir in $DIRS; do # generate coverprofile go test ./... -coverprofile=coverage.out -covermode=count -coverpkg= ./... - + + # Remove sql_driver_optional_methods from coverage.out file if it exists + sed -i '/sql_driver_optional_methods/d' coverage.out + # Test again against the latest version of the dependencies to ensure that # our instrumentation is up to date. TODO: Perhaps it is possible to # upgrade all go.mod dependencies to latest master with a go command. From b8d8746951bbf7bd6179ad8a02b334109a9fec2e Mon Sep 17 00:00:00 2001 From: mirackara Date: Fri, 9 Jun 2023 11:15:33 -0500 Subject: [PATCH 15/15] remove extraneous file --- codecov.yml | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 121d0007f..000000000 --- a/codecov.yml +++ /dev/null @@ -1,2 +0,0 @@ -ignore: - - "**/sql_driver_optional_methods.go" \ No newline at end of file