Speed up CI by avoiding repeated npm install & build already done with "prepare" hook

This commit is contained in:
Ronan Jouchet 2021-02-26 22:15:56 -05:00
parent 0aa8276922
commit e03e07e4bd
2 changed files with 4 additions and 4 deletions

View File

@ -25,8 +25,7 @@ jobs:
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- run: npm run dev-up - run: npm install # will also, through `prepare` hook, 1. install ./app, and 2. build
- run: npm run build
# Only run linter once, for faster CI. Align the verisons of Node here with above and publish.yml. # Only run linter once, for faster CI. Align the verisons of Node here with above and publish.yml.
- if: matrix.platform == 'ubuntu-latest' && matrix.node-version == '14.x' - if: matrix.platform == 'ubuntu-latest' && matrix.node-version == '14.x'
run: npm run lint run: npm run lint

View File

@ -14,9 +14,10 @@ jobs:
# Align the version of Node here with ci.yml. # Align the version of Node here with ci.yml.
node-version: '14.x' node-version: '14.x'
registry-url: 'https://registry.npmjs.org' registry-url: 'https://registry.npmjs.org'
- run: npm run dev-up # Will also (through `prepare` hook): 1. install ./app, and 2. build
- run: npm run build - run: npm install
- run: npm test - run: npm test
- run: npm run lint
- run: npm publish - run: npm publish
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}