Skip to content

Commit 9272740

Browse files
committed
fix(openapi): linting openAPI files in test stage
1 parent e7b6d3b commit 9272740

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

catalyst-gateway/Earthfile

+9-6
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ test:
108108
BUILD --platform=linux/amd64 ./tests+integration-test
109109
END
110110

111+
# test-lint-openapi - OpenAPI linting from an artifact
112+
# testing whether the OpenAPI generated during build stage follows good practice.
113+
test-lint-openapi:
114+
FROM github.com/input-output-hk/catalyst-ci/earthly/spectral:feat/openapi-lint+spectral-base
115+
# Copy the doc artifact.
116+
COPY +hosted-build/doc ./doc
117+
# Scan the doc directory where type of file is JSON.
118+
DO github.com/input-output-hk/catalyst-ci/earthly/spectral:feat/openapi-lint+BUILD_SPECTRAL --dir=./doc --file_type="json"
119+
111120
# Publish packages if all integration tests have passed. (Failure to pass tests will prevent packages being published.)
112121
# publish:
113122
# FROM scratch
@@ -122,9 +131,3 @@ local-ci-run:
122131
BUILD +test
123132
# BUILD +publish
124133

125-
check-lint-openapi:
126-
FROM github.com/input-output-hk/catalyst-ci/earthly/spectral:feat/openapi-lint+spectral-base
127-
# Copy the doc artifact.
128-
COPY +hosted-build/doc ./doc
129-
# Scan the doc directory where type of file is JSON.
130-
DO github.com/input-output-hk/catalyst-ci/earthly/spectral:feat/openapi-lint+BUILD_SPECTRAL --dir=./doc --file_type="json"

0 commit comments

Comments
 (0)