Skip to content

Commit d023926

Browse files
chore: fix action
1 parent 16bb75c commit d023926

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

.github/workflows/golang-tests-with-db.yaml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,12 @@ jobs:
6767
POSTGRES_URL: "postgresql://ctrlplane_test:test_password@localhost:5432/ctrlplane_test?sslmode=disable"
6868
run: |
6969
# TODO: Run your migrations here
70-
# Example: go run ../../packages/db/migrate.ts
7170
echo "Migrations would run here"
7271
73-
- name: Run all tests with coverage
72+
- name: Run DB package tests
7473
env:
7574
POSTGRES_URL: "postgresql://ctrlplane_test:test_password@localhost:5432/ctrlplane_test?sslmode=disable"
76-
POSTGRES_APPLICATION_NAME: "workspace-engine-test"
77-
run: go test -v -race -coverprofile=coverage.out -covermode=atomic -coverpkg=./... ./...
78-
79-
- name: Run DB package tests specifically
80-
env:
81-
POSTGRES_URL: "postgresql://ctrlplane_test:test_password@localhost:5432/ctrlplane_test?sslmode=disable"
82-
run: go test -v -race ./pkg/db/...
75+
run: go test -v -race -coverprofile=coverage.out -covermode=atomic ./pkg/db/...
8376

8477
- name: Generate coverage report
8578
run: go tool cover -html=coverage.out -o coverage.html
@@ -105,9 +98,9 @@ jobs:
10598
with:
10699
script: |
107100
const coverage = '${{ steps.coverage.outputs.percentage }}';
108-
const comment = `## 📊 Code Coverage Report (with DB Integration Tests)
101+
const comment = `## 📊 DB Package Test Coverage
109102
110-
**workspace-engine** coverage: \`${coverage}\`
103+
**pkg/db** coverage: \`${coverage}\`
111104
112105
[View detailed coverage report in artifacts](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})`;
113106

0 commit comments

Comments
 (0)