From f56face18827772ec600bd4bb192e5d0e4196b36 Mon Sep 17 00:00:00 2001 From: dcodeIO Date: Thu, 19 Jul 2018 19:43:06 +0200 Subject: [PATCH] Slim down CI stages --- .travis.yml | 48 +++++++++++++----------------------------------- package.json | 14 +++++++------- 2 files changed, 20 insertions(+), 42 deletions(-) diff --git a/.travis.yml b/.travis.yml index bc8967f3..ee8e90bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,46 +1,24 @@ language: node_js notifications: email: false -before_install: npm i -g npm@latest --no-audit -install: npm config set progress=false && npm i --no-audit +before_install: npm config set progress=false && npm i -g npm@latest --no-audit +install: npm i --no-audit cache: directories: - node_modules -stages: -- name: check-pr - if: type = pull_request jobs: include: - - - stage: check-pr - node_js: lts/* - script: ./scripts/check-pr.sh - env: Checks contributing guidelines before testing pull requests - - - stage: lint - node_js: node - script: npm run lint - env: Checks the sources with TSLint - - - stage: test - node_js: lts/* - script: npm run clean && node bin/asc -v && npm test - env: Tests the sources on latest node.js LTS - - node_js: node - script: npm run clean && node bin/asc -v && npm test - env: Tests the sources on latest stable node.js - node_js: lts/* script: - - npm run clean - - cd $TRAVIS_BUILD_DIR/tests/allocators/arena && npm run build && cd .. && npm test arena - - cd $TRAVIS_BUILD_DIR/tests/allocators/buddy && npm run build && cd .. && npm test buddy - - cd $TRAVIS_BUILD_DIR/tests/allocators/tlsf && npm run build && cd .. && npm test tlsf - env: Tests the allocators on latest node.js LTS - - - stage: build - node_js: lts/* - script: npm run build && node bin/asc -v && npm test - env: Builds and tests the bundle on latest node.js LTS + - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./scripts/check-pr.sh; fi + - npm run all + - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then + cd $TRAVIS_BUILD_DIR/tests/allocators/arena && npm run build && cd .. && npm test arena && + cd $TRAVIS_BUILD_DIR/tests/allocators/buddy && npm run build && cd .. && npm test buddy && + cd $TRAVIS_BUILD_DIR/tests/allocators/tlsf && npm run build && cd .. && npm test tlsf; + fi + env: Runs the tests on node.js LTS - node_js: node - script: npm run build && node bin/asc -v && npm test - env: Builds and tests the bundle on latest stable node.js + script: + - npm run all + env: Runs the tests on node.js stable diff --git a/package.json b/package.json index d64580b7..b8e03dc6 100644 --- a/package.json +++ b/package.json @@ -41,15 +41,15 @@ "scripts": { "build": "webpack --mode production --display-modules", "clean": "node scripts/clean", - "lint": "npm run lint:compiler && npm run lint:library", - "lint:compiler": "tslint -c tslint.json --project src --formatters-dir lib/lint/formatters --format as", - "lint:library": "tslint -c tslint.json --project std/assembly --formatters-dir lib/lint/formatters --format as", - "test:config": "tsc --noEmit -p src --diagnostics --listFiles", + "check": "npm run check:config && npm run check:compiler && npm run check:library", + "check:config": "tsc --noEmit -p src --diagnostics --listFiles", + "check:compiler": "tslint -c tslint.json --project src --formatters-dir lib/lint/formatters --format as", + "check:library": "tslint -c tslint.json --project std/assembly --formatters-dir lib/lint/formatters --format as", + "test": "npm run test:parser && npm run test:compiler", "test:parser": "node tests/parser", "test:compiler": "node tests/compiler", - "test": "npm run test:config --scripts-prepend-node-path && npm run test:parser --scripts-prepend-node-path && npm run test:compiler --scripts-prepend-node-path", - "test:pr": "npm run clean && npm test && npm run build && npm test && npm run clean", - "all": "npm run lint && npm run clean && npm test && npm run build && npm test", + "make": "npm run clean && npm test && npm run build && npm test", + "all": "npm run check && npm run make", "docs": "typedoc --tsconfig tsconfig-docs.json --mode modules --name \"AssemblyScript Compiler API\" --out ./docs/api --ignoreCompilerErrors --excludeNotExported --excludePrivate --excludeExternals --exclude **/std/** --includeDeclarations --readme src/README.md" }, "files": [