lizasolomyannik/frontend-project-lvl2

View on GitHub
.github/workflows/gendiff.yml

Summary

Maintainability
Test Coverage
# Name of workflow
name: gendiff

# Trigger the workflow on push or pull request
on:
  - push
  - pull_request

env:
  CI: true

jobs:
  build:

    # The type of machine to run the job on
    runs-on: ubuntu-latest

    strategy:
      # Node versions list
      matrix:
        node-version: [14.x]

    steps:
        # Check-out repository under GitHub workspace
        # https://github.com/actions/checkout
      - uses: actions/checkout@v2
        # Step's name
      - name: Use Node.js ${{ matrix.node-version }}
        # Configures the node version used on GitHub-hosted runners
        # https://github.com/actions/setup-node
        uses: actions/setup-node@v2
        # The Node.js version to configure
        with:
          node-version: ${{ matrix.node-version }}
          cache: 'npm'
      - run: make install
      - run: make lint
      - run: make test
      - name: Test & publish code coverage
        uses: paambaati/codeclimate-action@v3.0.0
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_KEY }}
        with:
          coverageCommand: make test-coverage
          debug: true
  # coverage:
  #   runs-on: ubuntu-latest
  #   strategy:
  #     # Node versions list
  #     matrix:
  #       node-version: [14.x]
  #   steps:
  #     - name: Test & publish code coverage
  #       uses: paambaati/codeclimate-action@v3.0.0
  #       env:
  #         CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_KEY }}
  #       with:
  #         coverageCommand: make test-coverage
  #         debug: true