Setup TARGET_GIT_REF

log-compat-test
Kacper Rączy 6 days ago
parent 0d79c054af
commit 7a07b5a4af
  1. 2
      .github/workflows/selfdrive_tests.yaml
  2. 4
      selfdrive/test/process_replay/test_log_compat.py

@ -152,6 +152,8 @@ jobs:
./selfdrive/ui/tests/create_test_translations.sh && \
QT_QPA_PLATFORM=offscreen ./selfdrive/ui/tests/test_translations && \
chmod -R 777 /tmp/comma_download_cache"
env:
TARGET_GIT_REF: ${{ github.event_name == 'pull_request' && github.base_ref || github.event.before }}
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:

@ -11,7 +11,7 @@ from openpilot.tools.lib.logreader import LogReader
from openpilot.common.run import run_cmd
MAX_EXAMPLES = int(os.environ.get("MAX_EXAMPLES", "2"))
TARGET_REF = os.environ.get("TARGET_REF", "")
TARGET_GIT_REF = os.environ.get("TARGET_GIT_REF", "origin/master")
@pytest.fixture(scope="module")
@ -19,7 +19,7 @@ def parent_schema_file(tmp_path_factory):
tmp_dir = tmp_path_factory.mktemp("cereal")
# TODO this will fail if the any capnp files are added/removed vs what was on the parent commit
commit = run_cmd(["git", "rev-parse", TARGET_REF]) if TARGET_REF else run_cmd(["git", "merge-base", "origin/master", "HEAD"])
commit = run_cmd(["git", "rev-parse", TARGET_GIT_REF])
opendbc_commit = run_cmd(["git", "ls-tree", "--object-only", commit, "opendbc_repo"]) # for car.capnp
for capnp_fp in glob(os.path.join(CEREAL_PATH, "**", "*.capnp"), recursive=True):
fname = os.path.relpath(capnp_fp, CEREAL_PATH)

Loading…
Cancel
Save