From 9f52e00bb4a48b033d50f2eb3fffb52c734e9ca6 Mon Sep 17 00:00:00 2001 From: "J. Borovec" Date: Wed, 22 Apr 2020 16:13:55 +0200 Subject: [PATCH 1/5] spec cache --- .github/workflows/ci-testing.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 4f94ba04..95db085c 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -67,15 +67,8 @@ jobs: # Look to see if there is a cache hit for the corresponding requirements file key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }}- - ${{ runner.os }}-${{ matrix.python-version }}- - - - name: Cache datasets - uses: actions/cache@v1 - with: - path: tests/Datasets # This path is specific to Ubuntu - # Look to see if there is a cache hit for the corresponding requirements file - key: mnist-dataset + ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} + ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} - name: Install dependencies run: | @@ -88,6 +81,13 @@ jobs: pip list shell: bash + - name: Cache datasets + uses: actions/cache@v1 + with: + path: tests/Datasets # This path is specific to Ubuntu + # Look to see if there is a cache hit for the corresponding requirements file + key: mnist-dataset + - name: Tests # env: # TOXENV: py${{ matrix.python-version }} From ea5e51c330349bd7db4f953618199fa47ae8961e Mon Sep 17 00:00:00 2001 From: "J. Borovec" Date: Wed, 22 Apr 2020 16:31:11 +0200 Subject: [PATCH 2/5] spec cache --- .github/workflows/ci-testing.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 95db085c..a0da0b4a 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -60,15 +60,20 @@ jobs: python -c "req = open('requirements.txt').read().replace('>', '=') ; open('requirements.txt', 'w').write(req)" python -c "req = open('requirements-extra.txt').read().replace('>', '=') ; open('requirements-extra.txt', 'w').write(req)" + # Note: This uses an internal pip API and may not always work + # https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow + - name: Get pip cache + id: pip-cache + run: | + python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" + - name: Cache pip - uses: actions/cache@v1 + - uses: actions/cache@v1 with: - path: ~/.cache/pip # This path is specific to Ubuntu - # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip-${{ hashFiles('**/requirements.txt') }} restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} - ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} + ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip- - name: Install dependencies run: | From f08399527929ad7cd4316c7fb915f9f454a5aef9 Mon Sep 17 00:00:00 2001 From: "J. Borovec" Date: Wed, 22 Apr 2020 18:44:51 +0200 Subject: [PATCH 3/5] trigger --- .github/workflows/ci-testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index a0da0b4a..2cfe662c 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -1,6 +1,6 @@ name: CI testing -# https://help.github.com/en/actions/reference/events-that-trigger-workflows +# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows on: # Trigger the workflow on push or pull request, # but only for the master branch From c13da418b54ed647ee432e973f8e688b595edc1b Mon Sep 17 00:00:00 2001 From: "J. Borovec" Date: Sun, 26 Apr 2020 21:14:41 +0200 Subject: [PATCH 4/5] extras --- .github/workflows/ci-testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index 2cfe662c..d5584198 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -71,9 +71,9 @@ jobs: - uses: actions/cache@v1 with: path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip-${{ hashFiles('**/requirements.txt') }} + key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-extra.txt') }} restore-keys: | - ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}-pip- + ${{ runner.os }}-${{ matrix.python-version }}-pip- - name: Install dependencies run: | From e8024b0925e3a13b1b0a6b2edab8ba707c09ac05 Mon Sep 17 00:00:00 2001 From: "J. Borovec" Date: Sun, 26 Apr 2020 21:19:45 +0200 Subject: [PATCH 5/5] checkout --- .github/workflows/docker_builds.yml | 2 +- .github/workflows/pypi-release.yml | 2 +- .github/workflows/rebase.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker_builds.yml b/.github/workflows/docker_builds.yml index 9ba099e5..8732a14e 100644 --- a/.github/workflows/docker_builds.yml +++ b/.github/workflows/docker_builds.yml @@ -19,7 +19,7 @@ jobs: if: contains(github.ref, 'refs/tags/') id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - uses: actions/checkout@2.14 + - uses: actions/checkout@v2 - name: Publish Releases to Docker # only on releases uses: elgohr/Publish-Docker-Github-Action@master diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 96535064..4283aec1 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Set up Python 3.7 uses: actions/setup-python@v1 with: diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml index 3db59b60..2f259816 100644 --- a/.github/workflows/rebase.yml +++ b/.github/workflows/rebase.yml @@ -10,7 +10,7 @@ jobs: if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Automatic Rebase