summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-04 19:33:05 (GMT)
committerDaniel Thompson <daniel.thompson@linaro.org>2020-12-04 20:11:41 (GMT)
commitf1f5cc9e0c113bf44c7ca2ce58ed1c41089a1b7f (patch)
treece20d71a92ed1010759f1919b29aa87dd04e52f8 /.github
parent3fb1faceab8c4067cf636e0628ab44fe77582f72 (diff)
simulator: Introduce fully automatic testint
Currently the tests do little more than fire up the simulator and switch into (and out of) the built in applications. However this is useful and allows us to fully integrate as a CI job. Unfortunately the numpy warning from pysdl2 mean we have been forced to disable all warnings to prevent pytest from collecting and reporting them. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/sim.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/sim.yml b/.github/workflows/sim.yml
new file mode 100644
index 0000000..03c9791
--- /dev/null
+++ b/.github/workflows/sim.yml
@@ -0,0 +1,44 @@
+name: wasp-os simulator tests
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ build:
+ runs-on: ubuntu-20.04
+
+ steps:
+ - name: Checkout files
+ id: checkout-files
+ uses: actions/checkout@v2
+
+ - name: Check the cached python downloads
+ id: cache-modules
+ uses: actions/cache@v2
+ env:
+ cache-name: cache-toolchain
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('wasp/requirements.txt') }}
+ restore-keys: ${{ runner.os }}-pip-${{ hashFiles('wasp/requirements.txt') }}
+
+ - name: Install packages
+ id: install-packages
+ run: |
+ sudo apt-get update
+ sudo apt-get install libsdl2-2.0.0
+
+ - name: Install python modules
+ id: install-modules
+ run: |
+ pip3 install -r wasp/requirements.txt
+
+ - name: Run the simulator tests
+ id: run-tests
+ run: |
+ PYTEST=$HOME/.local/bin/pytest \
+ SDL_VIDEODRIVER=dummy \
+ make check