Skip to content

Commit 244cd29

Browse files
committed
Added pre-commit and SPDX copyright
Signed-off-by: dherrada <[email protected]>
1 parent 826f130 commit 244cd29

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

.github/workflows/build.yml

+24-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
name: Build CI
26

37
on: [pull_request, push]
@@ -38,20 +42,36 @@ jobs:
3842
# (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.)
3943
run: |
4044
source actions-ci/install.sh
41-
- name: Pip install pylint, black, & Sphinx
45+
- name: Pip install pylint, Sphinx, pre-commit
4246
run: |
43-
pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
47+
pip install --force-reinstall pylint Sphinx sphinx-rtd-theme pre-commit
4448
- name: Library version
4549
run: git describe --dirty --always --tags
46-
- name: Check formatting
50+
- name: Pre-commit hooks
4751
run: |
48-
black --check --target-version=py35 .
52+
pre-commit run --all-files
4953
- name: PyLint
5054
run: |
5155
pylint $( find . -path './adafruit*.py' )
5256
([[ ! -d "examples" ]] || pylint --disable=missing-docstring,invalid-name,bad-whitespace $( find . -path "./examples/*.py" ))
5357
- name: Build assets
5458
run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location .
59+
- name: Archive bundles
60+
uses: actions/upload-artifact@v2
61+
with:
62+
name: bundles
63+
path: ${{ github.workspace }}/bundles/
5564
- name: Build docs
5665
working-directory: docs
5766
run: sphinx-build -E -W -b html . _build/html
67+
- name: Check For setup.py
68+
id: need-pypi
69+
run: |
70+
echo ::set-output name=setup-py::$( find . -wholename './setup.py' )
71+
- name: Build Python package
72+
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
73+
run: |
74+
pip install --upgrade setuptools wheel twine readme_renderer testresources
75+
python setup.py sdist
76+
python setup.py bdist_wheel --universal
77+
twine check dist/*

.github/workflows/release.yml

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
2+
#
3+
# SPDX-License-Identifier: MIT
4+
15
name: Release Actions
26

37
on:

0 commit comments

Comments
 (0)