change codecov base 3 #125
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| paths: | |
| - python-package/** | |
| - .github/workflows/Python-CMD-check.yaml | |
| branches: | |
| - main | |
| - master | |
| - dev | |
| - teste-codecov | |
| pull_request: | |
| paths: | |
| - python-package/** | |
| - .github/workflows/Python-CMD-check.yaml | |
| branches: | |
| - main | |
| - master | |
| - dev | |
| name: Python-CMD-check | |
| jobs: | |
| Python-CMD-check: | |
| runs-on: ${{ matrix.os }} | |
| name: ${{ matrix.os }} (${{ matrix.python-version }}${{ matrix.extras != '' && format(', {0}', matrix.extras) || '' }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macOS-latest, windows-latest] | |
| python-version: ["3.13", "3.14"] | |
| steps: | |
| - name: Check out geobr | |
| uses: actions/checkout@v4 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| shell: bash | |
| working-directory: python-package | |
| run: uv sync --frozen | |
| - name: Run tests with coverage | |
| shell: bash | |
| working-directory: python-package | |
| run: | | |
| uv run --with pytest-cov pytest -n 2 --cov=geobr --cov-report=xml --durations=10 -s ./tests -m "not network" | |
| - name: Upload coverage to Codecov | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }} | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| working-directory: python-package | |
| files: ./coverage.xml | |
| disable_search: true | |
| flags: python | |
| name: codecov-python |