Travis will check that the API suffers from no changes while running `npm run api` on the PR. If there are changes, an error message will send the contributor to check the README page about open api generated code.
27 lines
890 B
YAML
27 lines
890 B
YAML
language: node_js
|
|
sudo: required
|
|
branches:
|
|
only:
|
|
- main
|
|
- stage-stable
|
|
- prod-beta
|
|
- prod-stable
|
|
notifications:
|
|
email: false
|
|
node_js:
|
|
- '16'
|
|
install:
|
|
- npm ci
|
|
before_script: |
|
|
npm run api && [ -z "$(git status --porcelain=v1 2>/dev/null)" ] && echo "✓ No manual API changes." || echo "✗ API manually changed, please refer to the README for the procedure to follow for programmatically generated API endpoints." && [ -z "$(git status --porcelain=v1 2>/dev/null)" ]
|
|
script:
|
|
- NODE_ENV=production npm run build
|
|
- npm run lint
|
|
- npm run test
|
|
- npx codecov
|
|
after_success:
|
|
- curl -sSL https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master/src/bootstrap.sh | bash -s
|
|
env:
|
|
global:
|
|
- DEPLOY_REPO="git@github.com:RedHatInsights/image-builder-frontend-build"
|
|
- NODE_OPTIONS="--max-old-space-size=4096 --max_old_space_size=4096"
|