ci: only ignore generated files with do not edit
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ WORKDIR /build
|
|||||||
ENV CGO_ENABLED=0
|
ENV CGO_ENABLED=0
|
||||||
ADD . /build
|
ADD . /build
|
||||||
RUN CGO_ENABLED=1 go test -mod=readonly -race -coverprofile=coverage.txt.tmp -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
|
RUN CGO_ENABLED=1 go test -mod=readonly -race -coverprofile=coverage.txt.tmp -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
|
||||||
RUN ["/bin/bash", "-c", "cat coverage.txt.tmp | grep -v testing.go | grep -v -f <(find . -type f | xargs grep -l 'Code generated') > coverage.txt"]
|
RUN ["/bin/bash", "-c", "cat coverage.txt.tmp | grep -v testing.go | grep -v -f <(find . -type f | xargs grep -l 'Code generated by github.com/99designs/gqlgen, DO NOT EDIT') > coverage.txt"]
|
||||||
RUN go tool cover -html=coverage.txt -o coverage.html
|
RUN go tool cover -html=coverage.txt -o coverage.html
|
||||||
RUN go tool cover -func=coverage.txt
|
RUN go tool cover -func=coverage.txt
|
||||||
RUN rm coverage.txt.tmp
|
RUN rm coverage.txt.tmp
|
||||||
|
|||||||
Reference in New Issue
Block a user