Test CI v2.1.42
Some checks failed
DNS & Network Test / network-test (push) Failing after 3s
Go CI Pipeline / Lint Code (push) Successful in 1m27s
Go CI Pipeline / Run Tests (push) Successful in 1m13s
Go CI Pipeline / Security Scan (SCA - govulncheck) (push) Successful in 3m24s
Go CI Pipeline / Build Application (push) Successful in 1m4s
Go CI Pipeline / Build and Push Docker Image (push) Failing after 45s
Go CI Pipeline / Deploy to VPS (push) Has been skipped

This commit is contained in:
phattt2901 2025-05-05 21:41:58 +07:00
parent 5a3f2dd8ad
commit f49e6469f0

View File

@ -39,7 +39,7 @@ jobs:
name: Run Tests
# Step 3: Chuẩn hóa runs-on
runs-on: ubuntu-latest
# needs: [lint] # Có thể chạy song song với lint
needs: [lint] # Có thể chạy song song với lint
steps:
# Step 2: Cập nhật action versions
- name: Checkout code
@ -56,13 +56,11 @@ jobs:
- name: Install go-junit-report
run: go install github.com/jstemmer/go-junit-report@latest
# Step 7: Chạy test, tạo coverage và report JUnit
- name: Run Go Test, Coverage and Generate JUnit Report
# Step 7: Chạy test, tạo coverage
- name: Run Go Test, Coverage
run: |
# Chạy test với -v để go-junit-report có input, lưu output vào file log
go test -v -race -coverprofile=coverage.out ./... | tee test-output.log
# Tạo report JUnit từ output log
cat test-output.log | ~/go/bin/go-junit-report -set-exit-code > report.xml
# Tạo report coverage dạng text (tùy chọn)
go tool cover -func=coverage.out
# ---- Job: Security Scan (SCA - govulncheck) ----
@ -70,7 +68,7 @@ jobs:
name: Security Scan (SCA - govulncheck)
# Step 3: Chuẩn hóa runs-on
runs-on: ubuntu-latest
# needs: [lint, test] # Có thể chạy song song với test và lint
needs: [lint, test] # Có thể chạy song song với test và lint
steps:
# Step 2: Cập nhật action versions
- name: Checkout code