From adb0308ee6023111d448b36a35b27a0250a8446a Mon Sep 17 00:00:00 2001 From: Artem Linetskiy Date: Tue, 3 Dec 2024 16:33:49 +0100 Subject: [PATCH] Add cache to github runners --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff4297c35..83ef194d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,8 +58,22 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false + - name: Download cache from bucket + env: + GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} + run: | + echo '${{ secrets.GOOGLE_CREDENTIALS }}' > credentials.json + gcloud auth activate-service-account --key-file credentials.json + gsutil rsync -r gs://coreum-ci-cache /root/.cache/ - name: Run ${{ matrix.ci_step }} run: ${{ matrix.command }} + - name: Upload cache to bucket + env: + GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} + run: | + echo '${{ secrets.GOOGLE_CREDENTIALS }}' > credentials.json + gcloud auth activate-service-account --key-file credentials.json + gsutil rsync -r /root/.cache/ gs://coreum-ci-cache - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4 with: