mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-12 01:16:54 +08:00
Also test packages dir (#5)
* Also test packages dir * Fix passing of newlines into path
This commit is contained in:
15
.github/workflows/CI.yml
vendored
15
.github/workflows/CI.yml
vendored
@@ -6,9 +6,11 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- 'action.yml'
|
||||
- '.github/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'action.yml'
|
||||
- '.github/**'
|
||||
|
||||
jobs:
|
||||
generate-key:
|
||||
@@ -21,9 +23,7 @@ jobs:
|
||||
run: 'write("random.txt", string(rand(10)))'
|
||||
- name: Set cache-name as output
|
||||
id: name
|
||||
run: echo "::set-output name=cache-name::$(echo $CACHE_NAME)"
|
||||
env:
|
||||
CACHE_NAME: ${{ hashFiles('random.txt') }}
|
||||
run: echo "::set-output name=cache-name::${{ hashFiles('random.txt') }}"
|
||||
|
||||
test-save:
|
||||
needs: generate-key
|
||||
@@ -69,10 +69,11 @@ jobs:
|
||||
@assert ENV["cache-hit"] == "true"
|
||||
env:
|
||||
cache-hit: ${{ steps.cache.outputs.cache-hit }}
|
||||
- name: Check non-empty artifacts dir
|
||||
- name: Check non-empty artifacts and packages dir
|
||||
shell: 'julia --color=yes {0}'
|
||||
run: |
|
||||
dir = joinpath(first(DEPOT_PATH), "artifacts")
|
||||
@assert isdir(dir)
|
||||
@assert !isempty(readdir(dir))
|
||||
artifacts_dir = joinpath(first(DEPOT_PATH), "artifacts")
|
||||
@assert !isempty(readdir(artifacts_dir))
|
||||
packages_dir = joinpath(first(DEPOT_PATH), "packages")
|
||||
@assert !isempty(readdir(packages_dir))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user