Skip to content

Commit

Permalink
assume root as user in test job
Browse files Browse the repository at this point in the history
  • Loading branch information
lsy323 committed Jul 27, 2023
1 parent 5e63f8c commit 5a0e587
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
timeout-minutes: ${{ inputs.timeout-minutes }}
env:
DOCKER_IMAGE: ${{ inputs.docker-image }}
WORKDIR: /var/lib/jenkins/workspace
WORKDIR: /home
GCLOUD_SERVICE_KEY: ${{ secrets.gcloud-service-key }}
USE_COVERAGE: ${{ inputs.collect-coverage && '1' || '0' }}
XLA_SKIP_XRT_TESTS: ${{ inputs.disable-xrt }}
Expand Down Expand Up @@ -93,15 +93,16 @@ jobs:
echo "pid=${pid}" >> "${GITHUB_ENV}"
- name: Test
shell: bash
run: docker exec -u jenkins "${pid}" bash -c '. ~/.bashrc && .circleci/${{ inputs.test-script }}'
run: docker exec --privileged "${pid}" bash -c '. ~/.bashrc && .circleci/${{ inputs.test-script }}'
- name: Upload coverage results
if: ${{ inputs.collect-coverage }}
shell: bash
env:
CIRCLE_WORKFLOW_ID: ${{ github.run_id }}
CIRCLE_BUILD_NUM: ${{ github.run_number }}
run: |
docker cp "${pid}":/home/jenkins/htmlcov "${GITHUB_WORKSPACE}"
# docker cp "${pid}":/home/jenkins/htmlcov "${GITHUB_WORKSPACE}"
docker cp "${pid}":/root/htmlcov "${GITHUB_WORKSPACE}"
if [ -n "${GPU_FLAG:-}" ]; then
# Python
gsutil cp ${GITHUB_WORKSPACE}/htmlcov/lcov.info gs://ng3-metrics/ng3-pytorchxla-coverage/absolute/pytorchxla/${CIRCLE_WORKFLOW_ID}/gpu_python_coverage.out
Expand Down

0 comments on commit 5a0e587

Please sign in to comment.