]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blob - .github/workflows/build.yml
Add pre-commit support.
[hackapet/Adafruit_Blinka_Displayio.git] / .github / workflows / build.yml
1 # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2 # SPDX-FileCopyrightText: 2020 Melissa LeBlanc-Williams, written for Adafruit Industries
3 #
4 # SPDX-License-Identifier: MIT
5
6 name: Build CI
7
8 on: [pull_request, push]
9
10 jobs:
11   test:
12     runs-on: ubuntu-latest
13     steps:
14     - name: Dump GitHub context
15       env:
16         GITHUB_CONTEXT: ${{ toJson(github) }}
17       run: echo "$GITHUB_CONTEXT"
18     - name: Translate Repo Name For Build Tools filename_prefix
19       id: repo-name
20       run: |
21         echo ::set-output name=repo-name::Adafruit-Blinka-displayio
22     - name: Set up Python 3.6
23       uses: actions/setup-python@v1
24       with:
25         python-version: 3.6
26     - name: Versions
27       run: |
28         python3 --version
29     - name: Checkout Current Repo
30       uses: actions/checkout@v1
31       with:
32         submodules: true
33     - name: Checkout tools repo
34       uses: actions/checkout@v2
35       with:
36         repository: adafruit/actions-ci-circuitpython-libs
37         path: actions-ci
38     - name: Install dependencies
39       # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
40       run: |
41         source actions-ci/install.sh
42     - name: Pip install pylint, black, & Sphinx
43       run: |
44         pip install --force-reinstall pylint black Sphinx sphinx-rtd-theme pre-commit
45     - name: Library version
46       run: git describe --dirty --always --tags
47     - name: Pre-commit hooks
48       run: |
49         pre-commit run --all-files
50     - name: Build docs
51       working-directory: docs
52       run: sphinx-build -E -W -b html . _build/html