-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Build (Python ${{ matrix.python }}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ['3.9', '3.10', '3.11'] | ||
|
||
env: | ||
TERM: xterm-256color | ||
RELEASE_FILE: ${{ github.event.repository.name }}-${{ github.event.release.tag_name || github.sha }}-py${{ matrix.python }} | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
make dev-deps | ||
- name: Build Packages | ||
run: | | ||
make build | ||
- name: Upload Packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.RELEASE_FILE }} | ||
path: dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Install Test | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Install (Python ${{ matrix.python }}) | ||
runs-on: ubuntu-latest | ||
env: | ||
TERM: xterm-256color | ||
strategy: | ||
matrix: | ||
python: ['3.9', '3.10', '3.11'] | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Stub files & Patch install.sh | ||
run: | | ||
mkdir -p boot/firmware | ||
touch boot/firmware/config.txt | ||
sed -i "s|/boot/firmware|`pwd`/boot/firmware|g" install.sh | ||
sed -i "s|sudo raspi-config|raspi-config|g" pyproject.toml | ||
touch raspi-config | ||
chmod +x raspi-config | ||
echo `pwd` >> $GITHUB_PATH | ||
- name: Run install.sh | ||
run: | | ||
./install.sh --unstable --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: QA | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Linting & Spelling | ||
runs-on: ubuntu-latest | ||
env: | ||
TERM: xterm-256color | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python '3,11' | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Install Dependencies | ||
run: | | ||
make dev-deps | ||
- name: Run Quality Assurance | ||
run: | | ||
make qa | ||
- name: Run Code Checks | ||
run: | | ||
make check | ||
- name: Run Bash Code Checks | ||
run: | | ||
make shellcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Test (Python ${{ matrix.python }}) | ||
runs-on: ubuntu-latest | ||
env: | ||
TERM: xterm-256color | ||
strategy: | ||
matrix: | ||
python: ['3.9', '3.10', '3.11'] | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
make dev-deps | ||
- name: Run Tests | ||
run: | | ||
make pytest | ||
- name: Coverage | ||
if: ${{ matrix.python == '3.9' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
python -m pip install coveralls | ||
coveralls --service=github | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
build/ | ||
_build/ | ||
*.o | ||
*.so | ||
*.a | ||
*.py[cod] | ||
*.egg-info | ||
dist/ | ||
__pycache__ | ||
.DS_Store | ||
*.deb | ||
*.dsc | ||
*.build | ||
*.changes | ||
*.orig.* | ||
packaging/*tar.xz | ||
library/debian/ | ||
.coverage | ||
.pytest_cache | ||
.tox |