ci: faster test_models (#33941)

* test

* try 4 runners

* try

* 100 for fun

* the fun is over

* try even less
This commit is contained in:
Maxime Desroches
2024-11-06 19:17:15 -08:00
committed by GitHub
parent f13d1ae4d6
commit c995d5b9ae
3 changed files with 4 additions and 3 deletions

View File

@@ -251,7 +251,7 @@ jobs:
strategy:
fail-fast: false
matrix:
job: [0, 1]
job: [0, 1, 2, 3]
steps:
- uses: actions/checkout@v4
with:
@@ -271,7 +271,7 @@ jobs:
${{ env.RUN }} "$PYTEST selfdrive/car/tests/test_models.py && \
chmod -R 777 /tmp/comma_download_cache"
env:
NUM_JOBS: 2
NUM_JOBS: 4
JOB_ID: ${{ matrix.job }}
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4

View File

@@ -35,7 +35,7 @@ NUM_JOBS = int(os.environ.get("NUM_JOBS", "1"))
JOB_ID = int(os.environ.get("JOB_ID", "0"))
INTERNAL_SEG_LIST = os.environ.get("INTERNAL_SEG_LIST", "")
INTERNAL_SEG_CNT = int(os.environ.get("INTERNAL_SEG_CNT", "0"))
MAX_EXAMPLES = int(os.environ.get("MAX_EXAMPLES", "300"))
MAX_EXAMPLES = int(os.environ.get("MAX_EXAMPLES", "200"))
CI = os.environ.get("CI", None) is not None

View File

@@ -12,6 +12,7 @@ def internal_source_available(url=DATA_ENDPOINT):
hostname = urlparse(url).hostname
port = urlparse(url).port or 80
with socket.socket(socket.AF_INET,socket.SOCK_STREAM) as s:
s.settimeout(0.5)
s.connect((hostname, port))
return True
except (socket.gaierror, ConnectionRefusedError):