From 7953ccd8d5539f7b241f41728f23e09d43c5ee90 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Sat, 12 Jun 2021 10:23:35 +0200 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=91=B7=20Add=20Python=20venv=20cache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-suite.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index eed46850a9..f1fe64101c 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -21,13 +21,26 @@ jobs: - uses: "actions/setup-python@v2" with: python-version: "${{ matrix.python-version }}" + + - name: "Cache venv" + id: cache-venv + uses: actions/cache@v2.1.6 + with: + path: venv + key: env-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'setup.py') }} + - name: "Install dependencies" run: "scripts/install" + if: steps.cache-venv.outputs.cache-hit != 'true' + - name: "Run linting checks" run: "scripts/check" + - name: "Build package & docs" run: "scripts/build" + - name: "Run tests" run: "scripts/test" + - name: "Enforce coverage" run: "scripts/coverage" From 51bdac8b51178ca9047750618e6f9ecf30ed9250 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Mon, 14 Jun 2021 18:16:58 +0200 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=92=9A=20Fix=20cache=20path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-suite.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index f1fe64101c..00611f6e8d 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -22,16 +22,15 @@ jobs: with: python-version: "${{ matrix.python-version }}" - - name: "Cache venv" - id: cache-venv - uses: actions/cache@v2.1.6 + - uses: actions/cache@v2.1.6 + id: cache-requirements with: - path: venv + path: ~/.cache/pip key: env-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'setup.py') }} - name: "Install dependencies" run: "scripts/install" - if: steps.cache-venv.outputs.cache-hit != 'true' + if: steps.cache-requirements.outputs.cache-hit != 'true' - name: "Run linting checks" run: "scripts/check" From b7f8ce9cbc2af458fca5c3c100a8606b009ed1f8 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Mon, 14 Jun 2021 18:19:29 +0200 Subject: [PATCH 3/5] empty commit to test cache From 6418b9d29cbc3b6dafdbf3061703b28b3fca059b Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Mon, 14 Jun 2021 18:22:38 +0200 Subject: [PATCH 4/5] use python locationn --- .github/workflows/test-suite.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 00611f6e8d..17012aeadc 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -25,8 +25,8 @@ jobs: - uses: actions/cache@v2.1.6 id: cache-requirements with: - path: ~/.cache/pip - key: env-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'setup.py') }} + path: ${{ env.pythonLocation }} + key: ${{ env.pythonLocation }}-${{ matrix.python-version }}-${{ hashFiles('requirements.txt', 'setup.py') }} - name: "Install dependencies" run: "scripts/install" From 266d344625d6c91cbe2fbddd3f15c000e810c753 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Mon, 14 Jun 2021 18:26:41 +0200 Subject: [PATCH 5/5] empty commit to test cache