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