add cache-proxy test (#557)

test to verify that a cache stored in one repo can't be restored in another

Reviewed-on: https://code.forgejo.org/forgejo/end-to-end/pulls/557
Reviewed-by: Gusted <gusted@noreply.code.forgejo.org>
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Kwonunn <kwonunnx@gmail.com>
Co-committed-by: Kwonunn <kwonunnx@gmail.com>
This commit is contained in:
Kwonunn 2025-03-22 12:34:06 +00:00 committed by earl-warren
parent 4c1a4cbdac
commit f3a9672647
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201
7 changed files with 99 additions and 0 deletions

View file

@ -0,0 +1,25 @@
on: [push]
jobs:
build:
runs-on: docker
container:
image: code.forgejo.org/oci/node:20-bookworm
steps:
- name: cache restore
id: cachestep
uses: https://code.forgejo.org/actions/cache/restore@v4
with:
path: |
/usr/local/bin/something
key: thecoolsecretcachekey
- name: verify something
run: |
set -x
test SOMETHING = $(cat /usr/local/bin/something)
- name: cache hit
run: |
set -x
test "${{ steps.cachestep.outputs.cache-hit }}" = true