Skip to content

Commit 3efc2db

Browse files
committed
Added build.yaml
1 parent a9d3b85 commit 3efc2db

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build CI
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Dump GitHub context
10+
env:
11+
GITHUB_CONTEXT: ${{ toJson(github) }}
12+
run: echo "$GITHUB_CONTEXT"
13+
- name: Translate Repo Name For Build Tools filename_prefix
14+
id: repo-name
15+
run: |
16+
echo ::set-output name=repo-name::$(
17+
echo ${{ github.repository }} |
18+
awk -F '\/' '{ print tolower($2) }' |
19+
tr '_' '-'
20+
)
21+
- name: Set up Python 3.6
22+
uses: actions/setup-python@v1
23+
with:
24+
python-version: 3.6
25+
- name: Versions
26+
run: |
27+
python3 --version
28+
- uses: actions/checkout@v1
29+
with:
30+
submodules: true
31+
- name: Install deps
32+
run: |
33+
sudo apt-get install -y gettext
34+
pip install -r requirements.txt
35+
pip install circuitpython-build-tools Sphinx sphinx-rtd-theme
36+
pip install --force-reinstall pylint==1.9.2
37+
- name: Library version
38+
run: git describe --dirty --always --tags
39+
- name: PyLint
40+
run: |
41+
pylint $( find . -path './adafruit*.py' )
42+
([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace examples/*.py)
43+
- name: Build assets
44+
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
45+
- name: Build docs
46+
working-directory: docs
47+
run: sphinx-build -E -W -b html . _build/html

0 commit comments

Comments
 (0)