You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
name: $(BuildID)
|
|
|
|
resources:
|
|
repositories:
|
|
- repository: apt
|
|
type: github
|
|
name: futagoza/apt
|
|
endpoint: futagoza
|
|
|
|
variables:
|
|
- group: 'env-variables'
|
|
|
|
jobs:
|
|
|
|
- template: eslint.yml@apt
|
|
|
|
- template: node-test.yml@apt
|
|
parameters:
|
|
npm_test: False
|
|
beforeEach:
|
|
- script: |
|
|
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
|
chmod +x ./cc-test-reporter
|
|
displayName: 'Download Code Climate Test Reporter'
|
|
afterEach:
|
|
- script: |
|
|
./cc-test-reporter before-build
|
|
yarn test 2> /dev/null
|
|
if [ $? -eq 0 ]
|
|
then
|
|
echo '"yarn test" passed, publishing to code climate.'
|
|
./cc-test-reporter after-build --exit-code 0
|
|
echo 'Publishing code coverage results to coveralls.io'
|
|
yarn coverage
|
|
exit 0
|
|
else
|
|
echo '"yarn test" failed, publishing to code climate.'
|
|
./cc-test-reporter after-build --exit-code 1
|
|
exit 1
|
|
fi
|
|
displayName: 'mocha > codeclimate & coveralls'
|
|
env:
|
|
CC_TEST_REPORTER_ID: $(CC_TEST_REPORTER_ID)
|
|
CODECOV_TOKEN: $(CODECOV_TOKEN)
|
|
afterAll:
|
|
- script: |
|
|
npm run build-dist
|
|
node tools/publish-dev
|
|
displayName: 'publish pegjs@dev'
|
|
variables:
|
|
GIT_BRANCH: $(Build.SourceBranchName)
|
|
GIT_COMMIT_SHA: $(Build.SourceVersion)
|
|
NPM_TOKEN: $(NPM_TOKEN)
|
|
publish_test_results_to_pipelines: True
|
|
publish_code_coverage_to_pipelines: True
|