Skip to content

Disable codecov upload from forks for v1 #48

Disable codecov upload from forks for v1

Disable codecov upload from forks for v1 #48

Workflow file for this run

on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Ruff lint check
uses: astral-sh/ruff-action@v3
with:
version: "latest"
src: "./Lib"
lint_format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Ruff format check
uses: astral-sh/ruff-action@v3
with:
version: "latest"
src: "./Lib"
args: "format --check"
mypy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run mypy
run: mypy Lib/fontParts
test:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
platform: [ubuntu-latest, macos-latest, windows-latest]
exclude: # Only test on the oldest and latest supported stable Python on macOS and Windows.
- platform: macos-latest
python-version: 3.10
- platform: windows-latest
python-version: 3.10
- platform: macos-latest
python-version: 3.11
- platform: windows-latest
python-version: 3.11
- platform: macos-latest
python-version: 3.13
- platform: windows-latest
python-version: 3.13
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install packages
run: pip install tox coverage
- name: Run Tox
run: tox -e py-cov
- name: Produce coverage files
run: |
coverage combine
coverage xml
- name: Upload coverage to Codecov
if: github.repository == 'robotools/fontparts'
uses: codecov/codecov-action@v4
with:
file: coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}