From 11d92a7be54dec535aed34e21fa284576ed14646 Mon Sep 17 00:00:00 2001 From: chudilka1 Date: Mon, 22 Jul 2024 12:06:11 +0300 Subject: [PATCH] Enable race detectors in GH workflow (#41) --- .github/workflows/go.yaml | 13 ++++++++++++- .gitignore | 5 ++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index a33d266..c617020 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -66,6 +66,11 @@ jobs: go build -v ./... go test -v ./... -coverpkg=./... -coverprofile=ocr2_decryptionplugin_coverage.txt + - name: Race test OCR2 plugin + working-directory: ./go/ocr2/decryptionplugin + run: | + go test -race -v ./... -coverpkg=./... -coverprofile=ocr2_decryptionplugin_race_coverage.txt + - name: Download npm deps working-directory: ./js/tdh2 run: npm install @@ -75,6 +80,11 @@ jobs: run: | go build -v ./... go test -v ./... -coverpkg=./... -coverprofile=tdh_coverage.txt + + - name: Race test TDH2 + working-directory: ./go/tdh2 + run: | + go test -race -v ./... -coverpkg=./... -coverprofile=tdh_race_coverage.txt - name: Upload Go test reports if: always() @@ -83,7 +93,9 @@ jobs: name: go-test-results path: | ./go/ocr2/decryptionplugin/ocr2_decryptionplugin_coverage.txt + ./go/ocr2/decryptionplugin/ocr2_decryptionplugin_race_coverage.txt ./go/tdh2/tdh_coverage.txt + ./go/tdh2/tdh_race_coverage.txt sonar-scan: @@ -124,4 +136,3 @@ jobs: env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - diff --git a/.gitignore b/.gitignore index 424ef20..a717732 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,7 @@ *report.xml *report.txt *report.json -*.out \ No newline at end of file +*.out + +# logs +*.log \ No newline at end of file