From 69b48496a9108399e2047aa9c977afc2548f5cdd Mon Sep 17 00:00:00 2001 From: Jan Snasel Date: Thu, 12 Oct 2023 19:30:32 +0000 Subject: [PATCH] wip: cache --- .github/actions/unittests/action.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/actions/unittests/action.yml b/.github/actions/unittests/action.yml index 2c393a59..a260e8a1 100644 --- a/.github/actions/unittests/action.yml +++ b/.github/actions/unittests/action.yml @@ -33,10 +33,10 @@ runs: CACHE_KEY="$(docker compose run --rm --entrypoint='' -- nautobot invoke calc-dbdump-cache-key --salt="$DB_IMAGE")" echo "cache-key=$CACHE_KEY" | tee -a "$GITHUB_OUTPUT" - - name: "Restore Cache Database Dump" + - name: "Cache Database Dump" uses: actions/cache@v3 with: - path: "./dump.sql" + path: "development/dump.sql" key: "${{ steps.config.outputs.cache-key }}" restore-keys: "${{ steps.config.outputs.cache-key }}" - name: "Unit Tests" @@ -47,7 +47,7 @@ runs: PYTHON_VER: "${{ inputs.python-version }}" run: | cd development - if [[ -f ../dump.sql ]]; then + if [[ -f dump.sql ]]; then docker compose exec -- db sh -c \ 'psql --username=nautobot postgres' \ < dump.sql @@ -65,8 +65,3 @@ runs: -- \ nautobot \ invoke unittest --failfast --keepdb - - name: "Store Cache Database Dump" - uses: actions/cache@v3 - with: - path: "./dump.sql" - key: "${{ steps.config.outputs.cache-key }}"