Also test packages dir (#5)

* Also test packages dir

* Fix passing of newlines into path
This commit is contained in:
Rik Huijzer
2021-12-28 16:26:12 +01:00
committed by GitHub
parent 905462d72f
commit d2b01b0f17
2 changed files with 19 additions and 25 deletions

View File

@@ -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))