diff --git a/.circleci/config.yml b/.circleci/config.yml index 57d318bc24..05c901eee0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,8 +50,8 @@ references: run: name: Update jsonnet command: | - export PR_NUMBER=$(git ls-remote origin "pull/*/head" | grep -F -f <(git rev-parse HEAD) | awk -F'/' '{print $3}') export SHA=$(git rev-parse --short HEAD) + export PR_NUMBER=$(git ls-remote origin "pull/*/head" | grep -F -f $SHA | awk -F'/' '{print $3}') python -c "fname = 'dockers/tpu-tests/tpu_test_cases.jsonnet' ; data = open(fname).read().replace('{PYTORCH_VERSION}', '$XLA_VER') data = data.replace('{PYTHON_VERSION}', '$PYTHON_VER').replace('{PR_NUMBER}', '$PR_NUMBER').replace('{SHA}', '$SHA') ; open(fname, 'w').write(data)" cat dockers/tpu-tests/tpu_test_cases.jsonnet diff --git a/.github/workflows/ci-circleci.yml b/.github/workflows/ci-circleci.yml index 697fa444f3..d41c041c59 100644 --- a/.github/workflows/ci-circleci.yml +++ b/.github/workflows/ci-circleci.yml @@ -23,6 +23,9 @@ jobs: trigger-circleci: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} - uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5 env: CCI_TOKEN: ${{ secrets.CCI_TOKEN }} diff --git a/dockers/tpu-tests/tpu_test_cases.jsonnet b/dockers/tpu-tests/tpu_test_cases.jsonnet index 25d273ecbd..edf1f23d00 100644 --- a/dockers/tpu-tests/tpu_test_cases.jsonnet +++ b/dockers/tpu-tests/tpu_test_cases.jsonnet @@ -28,7 +28,7 @@ local tputests = base.BaseTest { cd lightning echo $PWD git ls-remote --refs origin - git fetch origin "refs/pull/{PR_NUMBER}/head:pr/{PR_NUMBER}" && git checkout "pr/{PR_NUMBER}" + git fetch origin "refs/pull/{PR_NUMBER}/head" git checkout {SHA} export PACKAGE_NAME=pytorch export FREEZE_REQUIREMENTS=1