Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ZainRizvi committed May 3, 2023
1 parent b95e719 commit e86222c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 20 deletions.
14 changes: 4 additions & 10 deletions .github/actions/pytest-cache-download/action.yml
Expand Up @@ -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 }}
Expand All @@ -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"
Expand All @@ -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 \
Expand Down
10 changes: 2 additions & 8 deletions .github/actions/pytest-cache-upload/action.yml
Expand Up @@ -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 }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/_linux-build.yml
Expand Up @@ -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
Expand Down

0 comments on commit e86222c

Please sign in to comment.