Skip to content

Commit

Permalink
wip: cache
Browse files Browse the repository at this point in the history
  • Loading branch information
snaselj committed Oct 12, 2023
1 parent e7c999d commit 69b4849
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/actions/unittests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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 }}"

0 comments on commit 69b4849

Please sign in to comment.