From 17163b0dbadedb0d0411c86984955ceaa3fb08d5 Mon Sep 17 00:00:00 2001 From: Mikhail Epifanov Date: Sat, 13 Jan 2024 16:44:18 +0100 Subject: [PATCH] save cache on failed tests --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d70b90f..cb72bc0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: key: | ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}-collectstatic-${{ hashFiles('**/*.css', '**/*.js', 'vue/src/*') }} - # Build Vue frontend + # Build Vue frontend & Dependencies - name: Set up Node ${{ matrix.node-version }} if: steps.django_cache.outputs.cache-hit != 'true' uses: actions/setup-node@v3 @@ -61,13 +61,22 @@ jobs: working-directory: ./vue run: yarn build - # Build backend - name: Compile Django StatisFiles if: steps.django_cache.outputs.cache-hit != 'true' run: | python3 manage.py collectstatic --noinput python3 manage.py collectstatic_js_reverse + - uses: actions/cache/save@v3 + if: steps.django_cache.outputs.cache-hit != 'true' + with: + path: | + ./cookbook/static + ./vue/webpack-stats.json + ./staticfiles + key: | + ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.node-version }}-collectstatic-${{ hashFiles('**/*.css', '**/*.js', 'vue/src/*') }} + - name: Django Testing project run: pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml