summaryrefslogtreecommitdiff
path: root/.github/workflows/docs-lint.yml
blob: 0333ec78ed96b165844affa3d939d0448eb00fa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Docs and lint

on: [push, pull_request]

env:
  FORCE_COLOR: 1

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        env:
        - TOXENV: docs
        - TOXENV: lint

    steps:
      - uses: actions/checkout@v2

      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.9

      - name: Get pip cache dir
        id: pip-cache
        run: |
          echo "::set-output name=dir::$(pip cache dir)"

      - name: Cache
        uses: actions/cache@v2
        with:
          path: ${{ steps.pip-cache.outputs.dir }}
          key:
            ${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}
          restore-keys: |
            ${{ matrix.os }}-${{ matrix.python-version }}-v1-

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          python -m pip install --upgrade tox

      - name: Tox
        run: tox
        env: ${{ matrix.env }}