Skip to content

Commit

Permalink
Add workflows for testing, building, and deploying to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff S committed Nov 30, 2021
1 parent 9c09e1c commit a199ea4
Show file tree
Hide file tree
Showing 105 changed files with 108 additions and 16,933 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build

on:
push:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
- name: Build and push to local registry
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: localhost:5000/jreesun/krux-builder:latest
- name: Inspect
run: |
docker buildx imagetools inspect localhost:5000/jreesun/krux-builder:latest
27 changes: 27 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docs

on:
push:
branches:
- main

jobs:
build-gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.9'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install mkdocs mkdocs-material pymdown-extensions
- name: Build docs
run: mkdocs build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
38 changes: 38 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Tests

on:
push:
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.9'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pylint
- name: Lint
run: |
pylint firmware/font/*.py
pylint firmware/scripts/*.py
pylint i18n/*.py
pylint src
translations:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.9'
- name: Validate translations
run: cd i18n && python3 i18n.py validate
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ disable=print-statement,
exec-used,
import-outside-toplevel,
wrong-import-position,
wrong-import-order
wrong-import-order,
duplicate-code

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
Empty file removed docs/.nojekyll
Empty file.
Loading

0 comments on commit a199ea4

Please sign in to comment.