Skip to content

Commit

Permalink
chore: Update PATH and Pub cache key in checkout.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
PlugFox committed Aug 22, 2024
1 parent fe6158b commit 5aae366
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/checkout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,8 @@ jobs:
id: install-dependencies
timeout-minutes: 1
run: |
echo $PUB_CACHE >> $GITHUB_PATH
echo $PUB_CACHE/bin >> $GITHUB_PATH
dart pub get --no-example
echo "PUB_CACHE=$PUB_CACHE"
echo "PUB_CACHE=${{ env.PUB_CACHE }}"
ls -la $PUB_CACHE
- name: 📥 Save Pub modules
id: cache-pub-save
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
env:
pub-cache-name: pub
threshold: 50
PUB_CACHE: /github/home/.pub-cache
timeout-minutes: 15
steps:
- name: 🚂 Get latest code
Expand All @@ -129,20 +130,14 @@ jobs:
uses: actions/cache/restore@v4
with:
path: |
$HOME/.pub-cache
${{ env.PUB_CACHE }}
key: ${{ runner.os }}-spinify-${{ env.pub-cache-name }}-${{ hashFiles('pubspec.yaml') }}

- name: 🗄️ Export Pub cache directory
id: export-pub-cache
timeout-minutes: 1
run: |
export PUB_CACHE=$HOME/.pub-cache
export PATH="$PATH":"$HOME/.pub-cache/bin"
- name: 👷 Install Dependencies
id: install-dependencies
timeout-minutes: 1
run: |
echo $PUB_CACHE/bin >> $GITHUB_PATH
apt-get update && apt-get install -y lcov bc
dart pub get --no-example
Expand All @@ -151,7 +146,7 @@ jobs:
uses: actions/cache/save@v4
with:
path: |
$HOME/.pub-cache
${{ env.PUB_CACHE }}
key: ${{ runner.os }}-spinify-${{ env.pub-cache-name }}-${{ hashFiles('pubspec.yaml') }}

- name: 📢 Run Echo server
Expand Down

0 comments on commit 5aae366

Please sign in to comment.