mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-12 09:26:53 +08:00
Add test to check compiled hasn't been cached (#49)
This commit is contained in:
7
.github/workflows/CI.yml
vendored
7
.github/workflows/CI.yml
vendored
@@ -69,11 +69,16 @@ jobs:
|
|||||||
@assert ENV["cache-hit"] == "true"
|
@assert ENV["cache-hit"] == "true"
|
||||||
env:
|
env:
|
||||||
cache-hit: ${{ steps.cache.outputs.cache-hit }}
|
cache-hit: ${{ steps.cache.outputs.cache-hit }}
|
||||||
- name: Check non-empty artifacts and packages dir
|
- name: Check existance or emptiness of affected dirs
|
||||||
shell: 'julia --color=yes {0}'
|
shell: 'julia --color=yes {0}'
|
||||||
run: |
|
run: |
|
||||||
|
# Artifacts and Packages should exist as they've been cached
|
||||||
artifacts_dir = joinpath(first(DEPOT_PATH), "artifacts")
|
artifacts_dir = joinpath(first(DEPOT_PATH), "artifacts")
|
||||||
@assert !isempty(readdir(artifacts_dir))
|
@assert !isempty(readdir(artifacts_dir))
|
||||||
packages_dir = joinpath(first(DEPOT_PATH), "packages")
|
packages_dir = joinpath(first(DEPOT_PATH), "packages")
|
||||||
@assert !isempty(readdir(packages_dir))
|
@assert !isempty(readdir(packages_dir))
|
||||||
|
|
||||||
|
# Caching the compiled dir is disabled by default and should not exist after restoring a cache
|
||||||
|
compiled_dir = joinpath(first(DEPOT_PATH), "compiled")
|
||||||
|
@assert !isdir(compiled_dir) || isempty(readdir(compiled_dir))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user