From a08588250b964f99496d84e758b0eb8366e8275b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 30 Jun 2020 22:01:19 +0300 Subject: [PATCH 1/4] Use v2 actions --- .github/workflows/lint.yml | 4 ++-- .github/workflows/test-windows.yml | 6 +++--- .github/workflows/test.yml | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 64296b377..387c4a632 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -24,7 +24,7 @@ jobs: lint-pip- - name: pre-commit cache - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.cache/pre-commit key: lint-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }} @@ -32,7 +32,7 @@ jobs: lint-pre-commit- - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 83dc5748b..cab6e811e 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -36,7 +36,7 @@ jobs: path: winbuild\depends - name: Cache pip - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~\AppData\Local\pip\Cache key: @@ -47,7 +47,7 @@ jobs: # sets env: pythonLocation - name: Set up Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} @@ -128,7 +128,7 @@ jobs: shell: pwsh - name: Upload errors - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 if: failure() with: name: errors diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8d2c6374..eb31ff997 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: - uses: actions/checkout@v2 - name: Ubuntu cache - uses: actions/cache@v1 + uses: actions/cache@v2 if: startsWith(matrix.os, 'ubuntu') with: path: ~/.cache/pip @@ -47,7 +47,7 @@ jobs: ${{ matrix.os }}-${{ matrix.python-version }}- - name: macOS cache - uses: actions/cache@v1 + uses: actions/cache@v2 if: startsWith(matrix.os, 'macOS') with: path: ~/Library/Caches/pip @@ -57,7 +57,7 @@ jobs: ${{ matrix.os }}-${{ matrix.python-version }}- - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} @@ -89,7 +89,7 @@ jobs: shell: pwsh - name: Upload errors - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 if: failure() with: name: errors From 829e1f189b88c3667a429de1b318fbd66de4dc26 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 30 Jun 2020 22:04:43 +0300 Subject: [PATCH 2/4] Simplify CI config --- .github/workflows/lint.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 387c4a632..b30901c18 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,9 +6,6 @@ jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8"] name: Python ${{ matrix.python-version }} @@ -31,18 +28,18 @@ jobs: restore-keys: | lint-pre-commit- - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python uses: actions/setup-python@v2 with: - python-version: ${{ matrix.python-version }} + python-version: 3.8 - name: Build system information run: python .github/workflows/system-info.py - name: Install dependencies run: | - python -m pip install --upgrade pip - python -m pip install --upgrade tox + python -m pip install -U pip + python -m pip install -U tox - name: Lint run: tox -e lint From 410095e129924fb221db138865383cb8c5c92fc6 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Tue, 30 Jun 2020 22:26:41 +0300 Subject: [PATCH 3/4] Use new 'pip cache dir' to combine macOS/Ubuntu cache config --- .github/workflows/test.yml | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb31ff997..d65f14c11 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,31 +36,25 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Ubuntu cache - uses: actions/cache@v2 - if: startsWith(matrix.os, 'ubuntu') - with: - path: ~/.cache/pip - key: - ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci/*.sh') }} - restore-keys: | - ${{ matrix.os }}-${{ matrix.python-version }}- - - - name: macOS cache - uses: actions/cache@v2 - if: startsWith(matrix.os, 'macOS') - with: - path: ~/Library/Caches/pip - key: - ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci/*.sh') }} - restore-keys: | - ${{ matrix.os }}-${{ matrix.python-version }}- - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: pip cache + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: + ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci/*.sh') }} + restore-keys: | + ${{ matrix.os }}-${{ matrix.python-version }}- + - name: Build system information run: python .github/workflows/system-info.py From fc5f4b4976f2b58f7e5bbafe2f23f8eea3755117 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Thu, 2 Jul 2020 13:08:42 +0300 Subject: [PATCH 4/4] Name it "Lint" --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b30901c18..3c658293e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest - name: Python ${{ matrix.python-version }} + name: Lint steps: - uses: actions/checkout@v2