summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2020-08-22 10:54:39 +0200
committerLars-Dominik Braun <lars@6xq.net>2020-08-22 10:54:39 +0200
commit7f8b709e5be27adf50252c72c4b22899779aea99 (patch)
tree172833840af366b34351924bab5523b2ddac3918
parentcb6940a2c467335813172a402a04cbfdb9b3b6de (diff)
downloadlulua-7f8b709e5be27adf50252c72c4b22899779aea99.tar.gz
lulua-7f8b709e5be27adf50252c72c4b22899779aea99.tar.bz2
lulua-7f8b709e5be27adf50252c72c4b22899779aea99.zip
Add GitHub Actions-based CI
-rw-r--r--.github/workflows/ci.yaml44
-rw-r--r--README.rst2
2 files changed, 46 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 0000000..9758584
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,44 @@
+name: CI
+on:
+ push:
+ branches: [ $default-branch ]
+ pull_request:
+ branches: [ $default-branch ]
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ python-version: [3.6, 3.7, 3.8, pypy3]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ pip install .
+ pip install flake8 pytest pytest-cov
+ - name: Lint with flake8
+ run: |
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
+ - name: Test with pytest
+ run: |
+ pytest lulua
+ - name: Upload coverage
+ uses: actions/upload-artifact@v2
+ with:
+ name: coverage
+ path: htmlcov/
+ - name: Build layouts
+ # Due to the lack of corpora, we can’t run the entire thing here.
+ run: |
+ ./gen.sh > build.ninja
+ ninja _build/report/ar-lulua.svg _build/report/ar-lulua.xmodmap
+ - name: Upload results
+ uses: actions/upload-artifact@v2
+ with:
+ name: report
+ path: _build/report/
+
diff --git a/README.rst b/README.rst
index 733f234..cf0fbe1 100644
--- a/README.rst
+++ b/README.rst
@@ -1,6 +1,8 @@
لؤلؤة
=====
+.. image:: https://github.com/PurpleSym/lulua/workflows/ci/badge.svg
+
Ergonomic Arabic Keyboard layout. See website_ for details.
.. _website: https://6xq.net/لؤلؤة/