summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2021-04-18 14:42:49 -0500
committerJordan Cook <jordan.cook@pioneer.com>2021-04-18 15:07:02 -0500
commit1fcbe2b30e4fdd96c345b5ea488ae51d3f542273 (patch)
tree08105f36afeff47db08d2156d4864499b18f2706 /.github
parent3f70eee11cb5aa4d2a77afae96d94f964c730195 (diff)
downloadrequests-cache-1fcbe2b30e4fdd96c345b5ea488ae51d3f542273.tar.gz
Run DynamoDB integration tests last, since the DynamoDB container takes longer to initialize
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml10
1 files changed, 7 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 8d3709e..049ee38 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,6 +9,7 @@ on:
workflow_dispatch:
env:
LATEST_PY_VERSION: '3.9'
+ COVERAGE_ARGS: '--cov --cov-report=term --cov-report=html'
jobs:
# Run unit tests for each supported python version
@@ -53,8 +54,10 @@ jobs:
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
# Run unit tests first (and with multiprocessing) to fail quickly if there are issues
run: |
- pytest tests/unit --numprocesses=auto --cov --cov-report=term --cov-report=html
- pytest tests/integration --cov --cov-report=term --cov-report=html --cov-append
+ pytest tests/unit --numprocesses=auto ${{ env.COVERAGE_ARGS }}
+ pytest -k 'not dynamodb' tests/integration ${{ env.COVERAGE_ARGS }} --cov-append
+ # Run DynamoDB tests last, since that container takes the longest to initialize
+ pytest tests/integration/test_dynamodb.py ${{ env.COVERAGE_ARGS }} --cov-append
- name: Send code coverage report to Coveralls
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
env:
@@ -66,7 +69,8 @@ jobs:
if: ${{ matrix.python-version != env.LATEST_PY_VERSION }}
run: |
pytest --numprocesses=auto tests/unit
- pytest tests/integration
+ pytest -k 'not dynamodb' tests/integration
+ pytest tests/integration/test_dynamodb.py
# Run code analysis checks
analyze: