Skip to content

Commit 4f5e85b

Browse files
authored
End-to-end publish test using examples from docs (#199)
1 parent 774a0df commit 4f5e85b

File tree

18 files changed

+1041
-919
lines changed

18 files changed

+1041
-919
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,8 @@ jobs:
141141

142142
- name: Run integration tests
143143
run: |
144-
chmod +x ./integrationtests/run_tests.sh
145-
./integrationtests/run_tests.sh
146-
147-
- name: Run integration tests with coverage
148-
run: |
149-
go test -v -race -coverprofile=integration-coverage.out -covermode=atomic ./integrationtests/...
150-
151-
- name: Upload integration coverage to Codecov
152-
uses: codecov/codecov-action@v4
153-
with:
154-
file: ./integration-coverage.out
155-
flags: integrationtests
156-
name: codecov-integration
157-
fail_ci_if_error: false
144+
chmod +x ./tests/integration/run.sh
145+
./tests/integration/run.sh
158146
159147
# Overall status check
160148
test-summary:

.github/workflows/integration-tests.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,27 +48,5 @@ jobs:
4848
- name: Run integration tests
4949
run: |
5050
# Run integration tests using the existing script
51-
chmod +x ./integrationtests/run_tests.sh
52-
./integrationtests/run_tests.sh
53-
54-
- name: Run integration tests with coverage
55-
run: |
56-
# Also run integration tests with Go test for coverage
57-
go test -v -race -coverprofile=integration-coverage.out -covermode=atomic ./integrationtests/...
58-
59-
- name: Generate integration test coverage report
60-
run: go tool cover -html=integration-coverage.out -o integration-coverage.html
61-
62-
- name: Upload integration coverage to Codecov
63-
uses: codecov/codecov-action@v4
64-
with:
65-
file: ./integration-coverage.out
66-
flags: integrationtests
67-
name: codecov-integration
68-
fail_ci_if_error: false
69-
70-
- name: Upload integration coverage artifact
71-
uses: actions/upload-artifact@v4
72-
with:
73-
name: integration-coverage-report
74-
path: integration-coverage.html
51+
chmod +x ./tests/integration/run.sh
52+
./tests/integration/run.sh

.golangci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@ issues:
117117
- path: docs/
118118
linters:
119119
- lll
120-
# Ignore magic numbers in test files
121-
- path: integrationtests/
122-
linters:
123-
- mnd
124120
# Allow local replacement directives in go.mod
125121
- path: go\.mod
126122
linters:

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ go run cmd/registry/main.go
5050
go test -v -race -coverprofile=coverage.out -covermode=atomic ./internal/...
5151

5252
# Integration tests
53-
./integrationtests/run_tests.sh
53+
./tests/integration/run.sh
5454

5555
# Test API endpoints
5656
./scripts/test_endpoints.sh

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
FROM golang:1.23-alpine AS builder
22
WORKDIR /app
33
COPY . .
4-
RUN go build -o /build/registry ./cmd/registry
4+
ARG GO_BUILD_TAGS
5+
RUN go build ${GO_BUILD_TAGS:+-tags="$GO_BUILD_TAGS"} -o /build/registry ./cmd/registry
56

67
FROM alpine:latest
78
WORKDIR /app

docs/server-json/examples.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,13 @@ The `dnx` tool ships with the .NET 10 SDK, starting with Preview 6.
222222
"id": "example-nuget-id-0000-1111-222222222222"
223223
},
224224
"version_detail": {
225-
"version": "0.3.0-beta"
225+
"version": "0.5.0"
226226
},
227227
"packages": [
228228
{
229229
"registry_name": "nuget",
230230
"name": "Knapcode.SampleMcpServer",
231-
"version": "0.3.0-beta",
231+
"version": "0.5.0",
232232
"runtime_hint": "dnx",
233233
"environment_variables": [
234234
{

integrationtests/README.md

Lines changed: 0 additions & 98 deletions
This file was deleted.

0 commit comments

Comments
 (0)