From 1160ee151327bc71d028e10de9c5bf761a7b6237 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 1 Jun 2020 15:20:36 +0300 Subject: [PATCH] GHA: Simplify and update lint.yml --- .github/workflows/lint.yml | 39 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 03896a5..13f3f43 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,39 +4,34 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.8] + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - - name: pip cache - uses: actions/cache@v1 + - name: Cache + uses: actions/cache@v2 with: - path: ~/.cache/pip - key: lint-pip-${{ hashFiles('**/setup.py') }} + path: | + ~/.cache/pip + ~/.cache/pre-commit + key: + lint-v2-${{ hashFiles('**/setup.py') }}-${{ + hashFiles('**/.pre-commit-config.yaml') }} restore-keys: | - lint-pip- + lint-v2- - - name: pre-commit cache - uses: actions/cache@v1 + - name: Set up Python + uses: actions/setup-python@v2 with: - path: ~/.cache/pre-commit - key: lint-pre-commit-v1-${{ hashFiles('**/.pre-commit-config.yaml') }} - restore-keys: | - lint-pre-commit-v1- - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} + python-version: 3.8 - 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 + env: + PRE_COMMIT_COLOR: always