ci: add test stage

This commit is contained in:
Rainer Killinger
2022-04-25 13:05:16 +02:00
parent ab6173ccff
commit f1480f3d72
2 changed files with 7 additions and 1 deletions

View File

@@ -4,10 +4,16 @@ before_script:
- npm ci - npm ci
stages: stages:
- test
- audit - audit
- publish - publish
- deploy - deploy
eslint-config:
stage: test
script:
- npm test
audit: audit:
stage: audit stage: audit
script: script:

View File

@@ -6,7 +6,7 @@
"scripts": { "scripts": {
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'docs: update changelog'",
"test": "eslint -c index.js test/test-file.ts", "test": "eslint -c index.js test/test-file.ts",
"prepublishOnly": "npm ci", "prepublishOnly": "npm ci && npm test",
"postversion": "npm run changelog", "postversion": "npm run changelog",
"preversion": "npm run prepublishOnly", "preversion": "npm run prepublishOnly",
"push": "git push && git push origin \"v$npm_package_version\"" "push": "git push && git push origin \"v$npm_package_version\""