From 33d73c90f005cfd3423affe358cad0f13c37728f Mon Sep 17 00:00:00 2001 From: Chris Hager Date: Fri, 25 Dec 2020 23:00:02 +0100 Subject: [PATCH] github action: test (#39) --- .github/workflows/test.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..43a03bf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,36 @@ +name: Run the tests + +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.x + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - name: Install MicroPython dependencies + run: | + sudo apt-get update + DEBIAN_FRONTEND=noninteractive sudo apt-get install -y build-essential libreadline-dev libffi-dev git pkg-config gcc-arm-none-eabi libnewlib-arm-none-eabi + git clone --recurse-submodules https://github.com/micropython/micropython.git + + - name: Build MicroPython + run: | + cd micropython + git checkout v1.13 + sudo make -C mpy-cross + sudo make -C ports/unix axtls install + cd .. + + - name: Run the tests + run: | + micropython -m upip install logging unittest uasyncio uasyncio.core + cp -r tinyweb ~/.micropython/lib/ + micropython test/test_server.py