Skip to content

Commit f56face

Browse files
committed
Slim down CI stages
1 parent 66cc359 commit f56face

File tree

2 files changed

+20
-42
lines changed

2 files changed

+20
-42
lines changed

.travis.yml

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,24 @@
11
language: node_js
22
notifications:
33
email: false
4-
before_install: npm i -g npm@latest --no-audit
5-
install: npm config set progress=false && npm i --no-audit
4+
before_install: npm config set progress=false && npm i -g npm@latest --no-audit
5+
install: npm i --no-audit
66
cache:
77
directories:
88
- node_modules
9-
stages:
10-
- name: check-pr
11-
if: type = pull_request
129
jobs:
1310
include:
14-
15-
- stage: check-pr
16-
node_js: lts/*
17-
script: ./scripts/check-pr.sh
18-
env: Checks contributing guidelines before testing pull requests
19-
20-
- stage: lint
21-
node_js: node
22-
script: npm run lint
23-
env: Checks the sources with TSLint
24-
25-
- stage: test
26-
node_js: lts/*
27-
script: npm run clean && node bin/asc -v && npm test
28-
env: Tests the sources on latest node.js LTS
29-
- node_js: node
30-
script: npm run clean && node bin/asc -v && npm test
31-
env: Tests the sources on latest stable node.js
3211
- node_js: lts/*
3312
script:
34-
- npm run clean
35-
- cd $TRAVIS_BUILD_DIR/tests/allocators/arena && npm run build && cd .. && npm test arena
36-
- cd $TRAVIS_BUILD_DIR/tests/allocators/buddy && npm run build && cd .. && npm test buddy
37-
- cd $TRAVIS_BUILD_DIR/tests/allocators/tlsf && npm run build && cd .. && npm test tlsf
38-
env: Tests the allocators on latest node.js LTS
39-
40-
- stage: build
41-
node_js: lts/*
42-
script: npm run build && node bin/asc -v && npm test
43-
env: Builds and tests the bundle on latest node.js LTS
13+
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./scripts/check-pr.sh; fi
14+
- npm run all
15+
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
16+
cd $TRAVIS_BUILD_DIR/tests/allocators/arena && npm run build && cd .. && npm test arena &&
17+
cd $TRAVIS_BUILD_DIR/tests/allocators/buddy && npm run build && cd .. && npm test buddy &&
18+
cd $TRAVIS_BUILD_DIR/tests/allocators/tlsf && npm run build && cd .. && npm test tlsf;
19+
fi
20+
env: Runs the tests on node.js LTS
4421
- node_js: node
45-
script: npm run build && node bin/asc -v && npm test
46-
env: Builds and tests the bundle on latest stable node.js
22+
script:
23+
- npm run all
24+
env: Runs the tests on node.js stable

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@
4141
"scripts": {
4242
"build": "webpack --mode production --display-modules",
4343
"clean": "node scripts/clean",
44-
"lint": "npm run lint:compiler && npm run lint:library",
45-
"lint:compiler": "tslint -c tslint.json --project src --formatters-dir lib/lint/formatters --format as",
46-
"lint:library": "tslint -c tslint.json --project std/assembly --formatters-dir lib/lint/formatters --format as",
47-
"test:config": "tsc --noEmit -p src --diagnostics --listFiles",
44+
"check": "npm run check:config && npm run check:compiler && npm run check:library",
45+
"check:config": "tsc --noEmit -p src --diagnostics --listFiles",
46+
"check:compiler": "tslint -c tslint.json --project src --formatters-dir lib/lint/formatters --format as",
47+
"check:library": "tslint -c tslint.json --project std/assembly --formatters-dir lib/lint/formatters --format as",
48+
"test": "npm run test:parser && npm run test:compiler",
4849
"test:parser": "node tests/parser",
4950
"test:compiler": "node tests/compiler",
50-
"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",
51-
"test:pr": "npm run clean && npm test && npm run build && npm test && npm run clean",
52-
"all": "npm run lint && npm run clean && npm test && npm run build && npm test",
51+
"make": "npm run clean && npm test && npm run build && npm test",
52+
"all": "npm run check && npm run make",
5353
"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"
5454
},
5555
"files": [

0 commit comments

Comments
 (0)