Skip to content

Commit

Permalink
ci: faster test_models (commaai#33941)
Browse files Browse the repository at this point in the history
* test

* try 4 runners

* try

* 100 for fun

* the fun is over

* try even less
  • Loading branch information
maxime-desroches authored Nov 7, 2024
1 parent f13d1ae commit c995d5b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/selfdrive_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ jobs:
strategy:
fail-fast: false
matrix:
job: [0, 1]
job: [0, 1, 2, 3]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/car/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
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


Expand Down
1 change: 1 addition & 0 deletions tools/lib/filereader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit c995d5b

Please sign in to comment.