caffco/get-video-duration

View on GitHub
.github/workflows/test.yml

Summary

Maintainability
Test Coverage
name: 'test'
on:
  pull_request:
  push:
    branches:
      - main

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        node-version: [14.x, 16.x, 18.x, 20.x, 21.x]
        os: [ubuntu-latest]
    steps:
      - name: Install git and nscd
        run: |
          sudo apt-get update 
          sudo apt-get install -y git nscd
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v3
        with:
          node-version: ${{ matrix.node-version }}
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Install dependencies
        run: yarn --frozen-lockfile
      - name: Run tests
        run: yarn test
      - name: Upload coverage
        uses: caffco/code-climate-github-action@v0.0.1-alpha.5
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
        with:
          repository_root_path: ${{github.workspace}}
          collect_coverage: 'true'
          coverage_file_patterns: |
            coverage/lcov.info:lcov