diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9987f6f8d3..65fabb015a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,10 +27,30 @@ jobs: steps: - name: "Clone Repository" uses: actions/checkout@v3 + - name: Get OSBUILD_TEST_STORE files + uses: actions/cache@v3 + with: + path: "${{ github.workspace }}/.osbuild-test-store" + key: not-needed-cache-should-work-everywhere - name: "Run" uses: osbuild/containers/src/actions/privdocker@552e30cf1b4ed19c6ddaa57f96c342b3dff4227b with: image: ghcr.io/osbuild/osbuild-ci:latest-202308241910 run: | + mkdir -p "/osb/host/${{ github.workspace }}/.osbuild-test-store" + # debug only + ls -a "/osb/host/${{ github.workspace }}/.osbuild-test-store" + touch "/osb/host/${{ github.workspace }}/.osbuild-test-store/lala" + ls -a "/osb/host/${{ github.workspace }}/.osbuild-test-store" + # this runs inside a docker container so the path needs adjusting + OSBUILD_TEST_STORE="/osb/host/${{ github.workspace }}/.osbuild-test-store" \ TEST_CATEGORY="${{ matrix.test }}" \ tox -e "${{ matrix.environment }}" + - name: Save OSBUILD_TEST_STORE files + uses: actions/cache/save@v3 + with: + path: "${{ github.workspace }}/.osbuild-test-store" + key: not-needed-cache-should-work-everywhere + - name: Debug cache (can be removed) + run: | + ls -a "/${{ github.workspace }}/.osbuild-test-store" diff --git a/tox.ini b/tox.ini index 30b1b3b726..971a0ca683 100644 --- a/tox.ini +++ b/tox.ini @@ -24,6 +24,7 @@ setenv = passenv = TEST_CATEGORY + OSBUILD_TEST_STORE commands = bash -c 'python -m pytest --pyargs --rootdir=. {env:TEST_CATEGORY}'