From: XhmikosR Date: Sun, 12 Dec 2021 13:13:17 +0000 (+0200) Subject: Update CI config X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=73c8564b2973db662de06a3cf8375718fcc614b6;p=stevenblack-hosts.git Update CI config * `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 --- diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5701eea12..7da607901 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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