diff --git a/.github/actions/pytest-cache-download/action.yml b/.github/actions/pytest-cache-download/action.yml index b8915c603a55..af5e69c12aee 100644 --- a/.github/actions/pytest-cache-download/action.yml +++ b/.github/actions/pytest-cache-download/action.yml @@ -4,19 +4,13 @@ description: Downloads the pytest cache to S3 inputs: cache_dir: - description: Path to the pytest cache directory. This is where the merged cache will be placed. + description: Path to the pytest cache directory, relative to $GITHUB_WORKSPACE. This is where the merged cache will be placed. required: true -outputs: - pr-identifier: - description: "Processed identifier" - value: ${{ steps.get-id.pr-identifier }} - runs: using: composite steps: - - name: Get the S3 key - id: get-id + - name: Download the cache shell: bash env: CACHE_DIR: ${{ inputs.cache_dir }} @@ -28,7 +22,7 @@ runs: set +x echo "all the commands sent to the below script:"" - echo "cache_dir: $CACHE_DIR" + echo "cache_dir: $GITHUB_WORKSPACE/$CACHE_DIR" echo "pr_identifier: $GITHUB_REF" echo "workflow: $WORKFLOW" echo "job: $JOB" @@ -38,7 +32,7 @@ runs: python3 .github/scripts/pytest_cache.py \ --upload \ - --cache_dir $CACHE_DIR \ + --cache_dir $GITHUB_WORKSPACE/$CACHE_DIR \ --pr_identifier $GITHUB_REF \ --workflow $WORKFLOW \ --job $JOB \ diff --git a/.github/actions/pytest-cache-upload/action.yml b/.github/actions/pytest-cache-upload/action.yml index 39e3fa8787ae..ed9acff9e655 100644 --- a/.github/actions/pytest-cache-upload/action.yml +++ b/.github/actions/pytest-cache-upload/action.yml @@ -4,23 +4,17 @@ description: Uploads the pytest cache to S3 inputs: cache_dir: - description: Path to the pytest cache directory. This folder will be zipped and uploaded to S3. + description: Path to the pytest cache directory, relative to $GITHUB_WORKSPACE. This folder will be zipped and uploaded to S3. required: true shard: description: Shard number for the current job required: false default: "0" -outputs: - pr-identifier: - description: "Processed identifier" - value: ${{ steps.get-id.pr-identifier }} - runs: using: composite steps: - - name: Get the S3 key - id: get-id + - name: Upload the cache shell: bash env: CACHE_DIR: ${{ inputs.cache_dir }} diff --git a/.github/workflows/_linux-build.yml b/.github/workflows/_linux-build.yml index 039c77aabffb..6ac8bd487793 100644 --- a/.github/workflows/_linux-build.yml +++ b/.github/workflows/_linux-build.yml @@ -84,9 +84,8 @@ jobs: # Temp for testing - name: Upload pytest cache uses: ./.github/actions/pytest-cache-upload - if: always() && steps.test.conclusion && steps.test.conclusion != 'skipped' with: - cache_dir: ${{ env.GITHUB_WORKSPACE }}/.pytest_cache + cache_dir: .pytest_cache # shard: ${{ matrix.shard }} - name: Calculate docker image