cityssm/corporate-records-manager

View on GitHub
appveyor.yml

Summary

Maintainability
Test Coverage
image: ubuntu
platform: Any CPU

environment:
  CODACY_PROJECT_TOKEN:
    secure: j6nhVW/UMLDWbVaIyAmm01lXiWmhQu821GYoHXrjxlr0JTLuiW8LSAO8ZC3Hlw2u
  CC_TEST_REPORTER_ID:
    secure: QmPT1mHJ7p9ljYIseIiZpUvg9UXZ6jC/EoP2BWy4V/TI99DCNTOnIyU6kIiaiJe51Q2h+69v10ti/q3tPDMuxR2ao/itYS6LWAdf6UVH1CU=

stack: "node 14"

services:
  - mssql

install:
  - npm install -g npm@7
  # install modules
  - sh: npm ci
  - sh: npm install -g mocha c8

before_test:
  # Download codeclimate test report
  - sh: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./codeclimate-test-reporter
  - sh: chmod +x ./codeclimate-test-reporter
  # Ensure SQL Server is up and running
  - sleep 10
  - sqlcmd -S localhost -U SA -P Password12! -Q 'select @@VERSION'
  # Initialize DB
  - sqlcmd -S localhost -U SA -P Password12! -Q 'create database CorporateRecords'
  - sqlcmd -S localhost -U SA -P Password12! -d CorporateRecords -i ./sql/createTables.sql

test_script:
  - cp ./data/configAppveyor.js ./data/config.js
  - c8 --reporter=lcov mocha --timeout 10000 --exit

after_test:
  # Send test result to codeclimate
  - sh: ./codeclimate-test-reporter before-build
  - sh: ./codeclimate-test-reporter after-build -t lcov --exit-code $?
  # Send test result to Codacy
  - sh: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r ./coverage/lcov.info

# Don't actually build.
build: off