From 971e603e1746bd9dbfb75a232e92c0cc0ef72646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 10 May 2021 10:01:51 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=91=B7=20Add=20GitHub=20Action=20cach?= =?UTF-8?q?e=20to=20speed=20up=20CI=20installs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docs.yml | 9 ++++++++- .github/workflows/publish.yml | 7 +++++++ .github/workflows/test.yml | 7 +++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 72e2da1070c4b..ad20f45b48437 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -16,12 +16,19 @@ jobs: uses: actions/setup-python@v2 with: python-version: "3.7" + - uses: actions/cache@v2 + id: cache + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-docs - name: Install Flit + if: steps.cache.outputs.cache-hit != 'true' run: python3.7 -m pip install flit - name: Install docs extras + if: steps.cache.outputs.cache-hit != 'true' run: python3.7 -m flit install --extras doc - name: Install Material for MkDocs Insiders - if: github.event.pull_request.head.repo.fork == false + if: github.event.pull_request.head.repo.fork == false && steps.cache.outputs.cache-hit != 'true' run: pip install git+https://${{ secrets.ACTIONS_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git - name: Build Docs run: python3.7 ./scripts/docs.py build-all diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 43f086e53781e..9dde4e066c59f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,9 +18,16 @@ jobs: uses: actions/setup-python@v2 with: python-version: "3.6" + - uses: actions/cache@v2 + id: cache + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-publish - name: Install Flit + if: steps.cache.outputs.cache-hit != 'true' run: pip install flit - name: Install Dependencies + if: steps.cache.outputs.cache-hit != 'true' run: flit install --symlink - name: Publish env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 88fa290d541c3..f346cab6be363 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,9 +19,16 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - uses: actions/cache@v2 + id: cache + with: + path: ${{ env.pythonLocation }} + key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test - name: Install Flit + if: steps.cache.outputs.cache-hit != 'true' run: pip install flit - name: Install Dependencies + if: steps.cache.outputs.cache-hit != 'true' run: flit install --symlink - name: Test run: bash scripts/test.sh From 959d0bcb47323748c67fdf5a733b5cbe15b0f981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 10 May 2021 10:07:21 +0200 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=91=B7=20Trigger=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit