Update beckn_ci.yml
This commit is contained in:
26
.github/workflows/beckn_ci.yml
vendored
26
.github/workflows/beckn_ci.yml
vendored
@@ -32,16 +32,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||||
|
|
||||||
# 4. Run golangci-lint on the entire APP_DIRECTORY (including subdirectories)
|
# 4. Run golangci-lint on the entire APP_DIRECTORY (including subdirectories) ${{ env.APP_DIRECTORY }}
|
||||||
- name: Run golangci-lint
|
- name: Run golangci-lint
|
||||||
run: |
|
run: |
|
||||||
golangci-lint run ${{ env.APP_DIRECTORY }}
|
golangci-lint run ./...
|
||||||
|
|
||||||
# 5. Run unit tests with coverage recursively for all Go files
|
# 5. Run unit tests with coverage recursively for all Go files ${{ env.APP_DIRECTORY }}
|
||||||
- name: Run unit tests with coverage
|
- name: Run unit tests with coverage
|
||||||
run: |
|
run: |
|
||||||
# Run tests recursively for all Go files
|
# Run tests recursively for all Go files
|
||||||
go test -v -coverprofile=coverage.out ${{ env.APP_DIRECTORY }}/...
|
go test -v -coverprofile=coverage.out ./...
|
||||||
|
|
||||||
# Generate coverage report
|
# Generate coverage report
|
||||||
go tool cover -func=coverage.out | tee coverage.txt
|
go tool cover -func=coverage.out | tee coverage.txt
|
||||||
@@ -68,12 +68,12 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# 7. Build the Go code
|
# 7. Build the Go code
|
||||||
- name: Build Go code
|
#- name: Build Go code
|
||||||
run: |
|
# run: |
|
||||||
go build -o myapp ${{ env.APP_DIRECTORY }}/...
|
# go build -o myapp ${{ env.APP_DIRECTORY }}/...
|
||||||
if [ ! -f myapp ]; then
|
# if [ ! -f myapp ]; then
|
||||||
echo "Build failed: myapp executable was not created."
|
# echo "Build failed: myapp executable was not created."
|
||||||
exit 1
|
# exit 1
|
||||||
else
|
# else
|
||||||
echo "Build succeeded: myapp executable created."
|
# echo "Build succeeded: myapp executable created."
|
||||||
fi
|
# fi
|
||||||
|
|||||||
Reference in New Issue
Block a user