Update CI config
authorXhmikosR <redacted>
Sun, 12 Dec 2021 13:13:17 +0000 (15:13 +0200)
committerXhmikosR <redacted>
Sun, 12 Dec 2021 13:37:11 +0000 (15:37 +0200)
* `actions/setup-python` now has built-in support for caching
* add `workflow_dispatch` to add the ability to manually trigger the workflow
* add Python 3.10
* add workflow name

.github/workflows/ci.yml

index 5701eea12426245fb7fac2de512282beda0e2140..7da607901601eb11cb41e8b82cc59340437a3d5c 100644 (file)
@@ -1,20 +1,25 @@
 name: CI
 
-on: [push, pull_request]
+on:
+  push:
+  pull_request:
+  workflow_dispatch:
 
 jobs:
   test:
+    name: Python ${{ matrix.python }} on ${{ matrix.os }}
     runs-on: ${{ matrix.os }}
 
     strategy:
       fail-fast: false
       matrix:
         python:
-          - 3.5
-          - 3.6
-          - 3.7
-          - 3.8
-          - 3.9
+          - '3.5'
+          - '3.6'
+          - '3.7'
+          - '3.8'
+          - '3.9'
+          - '3.10'
         os:
           - ubuntu-latest
           - macos-latest
@@ -28,24 +33,11 @@ jobs:
         uses: actions/setup-python@v2
         with:
           python-version: ${{ matrix.python }}
+          cache: pip
 
       - run: python --version
       - run: pip --version
 
-      - name: Get pip cache directory
-        id: pip-cache
-        run: |
-          echo "::set-output name=dir::$(pip cache dir)"
-
-      - name: Cache dependencies
-        uses: actions/cache@v2
-        with:
-          path: ${{ steps.pip-cache.outputs.dir }}
-          key: ${{ runner.os }}-python-v${{ matrix.python }}-${{ hashFiles('**/requirements.txt') }}
-          restore-keys: |
-            ${{ runner.os }}-python-v${{ matrix.python }}-${{ hashFiles('**/requirements.txt') }}
-            ${{ runner.os }}-python-v${{ matrix.python }}-
-
       - name: Install Python dependencies
         run: pip install -r requirements.txt
 
git clone https://git.99rst.org/PROJECT