From 398c9250a5b4e2d586ff1cfb27a82fe950d9fb22 Mon Sep 17 00:00:00 2001 From: James Adams Date: Thu, 17 Jun 2021 14:39:03 +0100 Subject: [PATCH] Add GitHub Action to run docker wrapper tests --- .github/workflows/docker_wrapper.yml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/docker_wrapper.yml diff --git a/.github/workflows/docker_wrapper.yml b/.github/workflows/docker_wrapper.yml new file mode 100644 index 0000000..25537da --- /dev/null +++ b/.github/workflows/docker_wrapper.yml @@ -0,0 +1,29 @@ +name: Python application + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 2 + uses: actions/setup-python@v2 + with: + python-version: 2.7 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Run tests + run: | + docker_wrapper/tests.py