ci: faster test_models (#33941)

* test

* try 4 runners

* try

* 100 for fun

* the fun is over

* try even less
pull/33951/head^2
Maxime Desroches 6 months ago committed by GitHub
parent f13d1ae4d6
commit c995d5b9ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      .github/workflows/selfdrive_tests.yaml
  2. 2
      selfdrive/car/tests/test_models.py
  3. 1
      tools/lib/filereader.py

@ -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

@ -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

@ -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):

Loading…
Cancel
Save