From c1224b4b6b3551e626ecbfbf13ee4eb51751c966 Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Fri, 3 May 2024 15:35:53 +0200 Subject: [PATCH] Fail the CI restore build step if the cache is missing --- .github/workflows/build.yml | 1 + .github/workflows/deploy.yml | 1 + .github/workflows/validate.yml | 3 +++ 3 files changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 093234e..0eb8193 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,7 @@ jobs: - name: Restore build uses: actions/cache@v4 with: + fail-on-cache-miss: true path: ${{ env.pythonLocation }} key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }} # Cache the entire build Python environment restore-keys: | diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 94c060f..592baa9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -44,6 +44,7 @@ jobs: - name: Restore build uses: actions/cache@v4 with: + fail-on-cache-miss: true path: ${{ env.pythonLocation }} key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }} - name: Cache release diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 5241f27..4b11214 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -23,6 +23,7 @@ jobs: - name: Restore build uses: actions/cache@v4 with: + fail-on-cache-miss: true path: ${{ env.pythonLocation }} key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }} - run: make check-syntax-errors @@ -44,6 +45,7 @@ jobs: - name: Restore build uses: actions/cache@v4 with: + fail-on-cache-miss: true path: ${{ env.pythonLocation }} key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }} - run: make test @@ -60,6 +62,7 @@ jobs: - name: Restore build uses: actions/cache@v4 with: + fail-on-cache-miss: true path: ${{ env.pythonLocation }} key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }} - name: Test the Web API