Merge pull request #4220 from JoinColony/update-dapp-cicd #6313
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master, feature/* ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.18.0] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get npm cache directory | |
id: npm-cache | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- name: Cache node modules | |
uses: actions/cache@v1 | |
with: | |
path: ${{ steps.npm-cache.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: npm | |
run: npm i -g [email protected] --registry=https://registry.npmjs.org | |
- run: npm install --legacy-peer-deps | |
- run: npm run typecheck | |
- run: npm run lint:ci | |
- run: npm run stylelint:ci | |
- run: npm run test:ci | |
- run: npm run webpack:build:prod | |
env: | |
CI: true |