Skip to content

Commit

Permalink
ci: fix home dir
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov committed Nov 13, 2024
1 parent df8eb06 commit ca7017a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/actions/rust/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,20 @@ runs:
shell: bash
run: echo "key=$(echo '${{ github.ref_name }}' | sha256sum | cut -d ' ' -f1)" >> $GITHUB_OUTPUT

- name: Set HOME variable to github context
shell: bash
run: echo "HOME=$HOME" >> $GITHUB_ENV

- name: Cache cargo registry (S3 bucket cache)
uses: strophy/actions-cache@opendal-update
if: inputs.cache == 'true'
with:
bucket: multi-runner-cache-x1xibo9c
root: actions-cache
path: |
/home/ubuntu/.cargo/registry/index
/home/ubuntu/.cargo/registry/cache
/home/ubuntu/.cargo/git
${{ env.HOME }}/.cargo/registry/index
${{ env.HOME }}/.cargo/registry/cache
${{ env.HOME }}/.cargo/git
key: ${{ runner.os }}/cargo/registry/${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}/cargo/registry/${{ hashFiles('**/Cargo.lock') }}
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/tests-dashmate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,18 @@ jobs:
run: echo "sha=$(git log -1 --format="%h" -- packages/dashmate)" >> $GITHUB_OUTPUT
if: inputs.restore_local_network_data == true

- name: Set HOME variable to github context
shell: bash
run: echo "HOME=$HOME" >> $GITHUB_ENV

- name: Use test suite local network data to speed up dashmate local network tests
id: local-network-data
uses: strophy/actions-cache/restore@opendal-update
with:
bucket: multi-runner-cache-x1xibo9c
root: local-network-data
path: |
/home/ubuntu/.dashmate
${{ env.HOME }}/.dashmate
dashmate_volumes_dump
key: local-network-volumes/${{ steps.dashmate-fingerprint.outputs.sha }}
if: inputs.restore_local_network_data == true
Expand All @@ -105,7 +109,7 @@ jobs:
env:
DEBUG: 1
DASHMATE_E2E_TESTS_SKIP_IMAGE_BUILD: true
DASHMATE_E2E_TESTS_LOCAL_HOMEDIR: /home/ubuntu/.dashmate
DASHMATE_E2E_TESTS_LOCAL_HOMEDIR: ${{ env.HOME }}/.dashmate
if: steps.local-network-data.outputs.cache-hit == 'true'

- name: Run tests without cache
Expand Down

0 comments on commit ca7017a

Please sign in to comment.