From dc50f3d4acf37ddcace5077206e90fc198dc65db Mon Sep 17 00:00:00 2001 From: Felix Brilej Date: Mon, 22 Feb 2021 19:23:52 +0100 Subject: [PATCH] Add a coverage step --- .github/workflows/coverage.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/coverage.yaml diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml new file mode 100644 index 0000000..3150f6c --- /dev/null +++ b/.github/workflows/coverage.yaml @@ -0,0 +1,30 @@ +name: Python coverage + +on: + push: + branches: [master] + pull_request: + branches: [master] + +env: + AWS_DEFAULT_REGION: eu-central-1 + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 coverage boto3 moto pytest + - name: Coverage + run: | + cd cost-reporter + PYTHONPATH=./src coverage run --branch -m pytest + PYTHONPATH=./src coverage report src/*.py