anantoghosh/react-linkify-it

View on GitHub
.github/workflows/node.js.yml

Summary

Maintainability
Test Coverage
# 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: Build

on:
  push:
    branches: [ '*' ]
  pull_request:
    branches: [ '*' ]

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [16.x]
        # See supported Node.js release schedule at https://nodejs.org/en/about/releases/

    steps:
    - uses: actions/checkout@v3
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v3
      with:
        node-version: ${{ matrix.node-version }}
    - name: Cache .pnpm-store
      uses: actions/cache@v3
      with:
        path: ~/.pnpm-store
        key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
    - name: Install pnpm
      run: corepack enable
    - run: pnpm install
    - run: pnpm eslint
    - run: pnpm test
    - run: pnpm build
    - name: Publish code coverage
      uses: paambaati/codeclimate-action@v3.2.0
      env:
        CC_TEST_REPORTER_ID: 7faf3080bb50c92d2efae792088aca807b6a54bafa2482384b30d163a7a28838