在此处提供一个示例流程:
示例代码:
{
"name": "customer",
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"address": {
"type": "string"
}
}
}
stages:
- build
- test
- deploy
build:
stage: build
script:
- npm install
artifacts:
paths:
- ./dist
test:
stage: test
script:
- npm test
deploy:
stage: deploy
script:
- npm run deploy
describe('/customers', function() {
it('should return a 200 response', function(done) {
request.get('/customers', function(response) {
assert.equal(response.status, 200);
done();
});
});
});