From b695972eeb82018cc78829dba29c2c65bb9a872e Mon Sep 17 00:00:00 2001 From: Sascha Mann Date: Fri, 13 Jan 2023 14:15:12 +0100 Subject: [PATCH] Add test to check compiled hasn't been cached (#49) --- .github/workflows/CI.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bf9de22..683d391 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -69,11 +69,16 @@ jobs: @assert ENV["cache-hit"] == "true" env: 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}' run: | + # Artifacts and Packages should exist as they've been cached artifacts_dir = joinpath(first(DEPOT_PATH), "artifacts") @assert !isempty(readdir(artifacts_dir)) packages_dir = joinpath(first(DEPOT_PATH), "packages") @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)) +