diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 76d7f224..5d2c3893 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -1,4 +1,4 @@ -name: Node.js CI +name: Build, Test, Lint, Format (Node.js) on: [pull_request] @@ -16,42 +16,26 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - # - name: Cache node modules - # uses: actions/cache@v1 - # with: - # path: node_modules - # key: ${{ matrix.os }}-${{ matrix.node-version }}-build-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ matrix.os }}-${{ matrix.node-version }}-build-${{ env.cache-name }}- - # ${{ matrix.os }}-${{ matrix.node-version }}-build- - # ${{ matrix.os }}-${{ matrix.node-version }}- - # - name: Cache Cypress - # uses: actions/cache@v1 - # with: - # path: /home/runner/.cache/Cypress - # key: ${{ matrix.os }}-${{ matrix.node-version }}-cypress-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ matrix.os }}-${{ matrix.node-version }}-cypress-${{ env.cache-name }}- - # ${{ matrix.os }}-${{ matrix.node-version }}-cypress- - # ${{ matrix.os }}-${{ matrix.node-version }}- - name: install latest npm - run: | - npm install -g npm@latest - - name: npm install, build, and test - run: | - npm install - npm run build --if-present - npm test + run: npm install -g npm@latest + - name: npm install + run: npm install env: CI: true - - name: check formatting - if: always() + - name: npm run build --if-present + run: npm run build --if-present + env: + CI: true + - name: npm test + run: npm test + env: + CI: true + - name: npm run format:check run: npm run format:check env: CI: true NODE_ENV: test - - name: lint - if: always() + - name: npm run lint run: npm run lint env: CI: true