From 1da30487ea5559540798e4edcb63a43d11778205 Mon Sep 17 00:00:00 2001 From: Denton Gentry Date: Thu, 19 Sep 2019 13:15:23 -0500 Subject: [PATCH] First attempt at GitHub CI. Add .flake8 config file, we may use flake8 for linting. We'd have to do a big code reformat for this to be done for keepsies. Add .github/workflows/drawdown.yml to run pytest and upload to codecov.io. --- .flake8 | 7 +++++++ .github/workflows/drawdown.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .flake8 create mode 100644 .github/workflows/drawdown.yml diff --git a/.flake8 b/.flake8 new file mode 100644 index 000000000..1cb595192 --- /dev/null +++ b/.flake8 @@ -0,0 +1,7 @@ +[flake8] +ignore = + # one blank line before docstring + D203, + E128, E126 +exclude = .git,__pycache__,voila +max-complexity = 10 diff --git a/.github/workflows/drawdown.yml b/.github/workflows/drawdown.yml new file mode 100644 index 000000000..6eaa1dea8 --- /dev/null +++ b/.github/workflows/drawdown.yml @@ -0,0 +1,28 @@ +name: Drawdown Python application + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Set up Python 3.7 + uses: actions/setup-python@v1 + with: + python-version: 3.7 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Test with pytest + run: | + pip install pytest + pytest -v --cov=. --cov-report term --cov-report=xml --strict-markers + - name: Export to codecov.io + uses: codecov/codecov-action@v1.0.2 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: ./coverage.xml