Ananto30/zero

View on GitHub
.github/workflows/codecov.yml

Summary

Maintainability
Test Coverage
name: CodeCov

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]
  schedule:
    - cron: '0 0 * * 0'

jobs:
  test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python-version: ["3.8", "3.9", "3.10"]
    steps:
    - uses: actions/checkout@v4
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}
        cache: pip
    - name: Install dependencies
      timeout-minutes: 5
      run: |
        python -m pip install pip==23.3.1
        pip install -r tests/requirements.txt
    - name: Run tests
      timeout-minutes: 5
      run: |
        make test
    - name: Upload Coverage to Codecov
      if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' }}
      uses: codecov/codecov-action@v3