language: node_js cache: npm git: depth: 1 jobs: include: - &test stage: Test node_js: "14" before_install: npm install -g npm@latest install: npm ci script: - npm audit --production - set -o pipefail && npm audit --audit-level=high --parseable | awk -F $'\t' 'NF {print $2,"("$3") - "$4" - "$5" - "$6}' | awk '!visited[$0]++' - npm test - &test-compatibility stage: Compatibility node_js: "node" os: linux install: - npm install - npm update script: - npm test - <<: *test-compatibility node_js: "14" - <<: *test-compatibility node_js: "16" - <<: *test-compatibility node_js: "18" - &test-compatibility-osx <<: *test-compatibility os: osx - <<: *test-compatibility-osx node_js: "14" - <<: *test-compatibility-osx node_js: "16" - <<: *test-compatibility-osx node_js: "18" - stage: Lint Examples name: AML Check node_js: "14" script: - cd ./examples/aml-check - npm update - npm run lint - name: Profile node_js: "14" script: - cd ./examples/profile - npm update - npm run lint - name: IDV node_js: "14" script: - cd ./examples/idv - npm install - npm run lint - <<: *test stage: Analyze name: Sonarcloud dist: trusty addons: sonarcloud: organization: "getyoti" if: type == pull_request OR branch = master script: - npm test - sonar-scanner