Comments (4)
Good suggestion :) We'll investigate some options.
from aws-lambda-go.
This would also be great to ensure proper code coverage (and show it).
from aws-lambda-go.
I did a PoC. I forked the repository and configured it to use Travis CI and Coveralls. Please check these files:
.travis.yml
language: go
install:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- go get -u github.com/golang/dep/cmd/dep
script:
- $HOME/gopath/bin/dep ensure
- /bin/bash ./test_coverage.sh
after_success:
- $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN
test_coverage.sh
#!/usr/bin/env bash
# Copied from https://raw.githubusercontent.com/coniks-sys/coniks-go/master/test_coverage.sh
DIR_SOURCE="$(find . -maxdepth 10 -type f -not -path '*/vendor*' -name '*.go' | xargs -I {} dirname {} | sort | uniq)"
# If you want to test in combination with the -race flag on you have to use the atomic mode:
# echo "mode: atomic" > profile.cov
echo "mode: count" > profile.cov
all_tests_passed=true
# Run test coverage on each subdirectories and merge the coverage profile
for dir in ${DIR_SOURCE};
do
# change to -covermode=atomic if you want to run in combination with -race:
go test -covermode=count -coverprofile=$dir/profile.tmp $dir
if [ $? -ne 0 ]; then
all_tests_passed=false
fi
if [ -f $dir/profile.tmp ]
then
cat $dir/profile.tmp | tail -n +2 >> profile.cov
rm $dir/profile.tmp
fi
done
if [[ $all_tests_passed = true ]]; then
exit 0;
else
exit 1;
fi
The result, at the time of my PoC, was:
from aws-lambda-go.
Enabled Travis with 9b2186b
from aws-lambda-go.
Related Issues (20)
- S3ObjectLambdaEvent is missed in codebase
- events.CodeCommitReference has missing Deleted field HOT 2
- ALB target grouped Lambda returns fine but alb return 502 error that "LambdaInvalidResponse" HOT 2
- Deserialisation of array values in Cognito events custom UserAttributes not working correctly HOT 1
- Support structured JSON logging for errors HOT 2
- please add a mocked example HOT 1
- Custom runtime provided.al2 broken on v1.42 HOT 1
- Add IoTCoreMQTTMessage to aws/aws-lambda-go/events
- Add disconnectStatusCode to event/APIGatewayWebsocketProxyRequestContext
- RequestContext.Authorizer differs between REST gateway vs HTTP gateway
- UnmarshalTypeError on CodePipelineEventBridgeEvent HOT 4
- Missing field enableSMSMFA on struct events.CognitoEventUserPoolsMigrateUserResponse
- Runtime.InvalidEntrypoint
- Add AWS CloudWatch Alarm Event
- Implement `MultiValueHeaders` for ``events.LambdaFunctionURLResponse``
- Small improvement in APIGatewayWebsocketProxyRequestContext.Authorizer
- [BUG] Traceability panic error memory address runtime al2023
- Getting Segmentation Fault while using Lambda function with SAM Server
- Lambda Function Not Routing Correctly with API Gateway
- Please export extensionAPIClient HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-lambda-go.