summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2022-04-01 14:11:11 -0500
committerJordan Cook <jordan.cook@pioneer.com>2022-04-01 16:23:05 -0500
commit5e1472b67dee6b4bddd240968a6ff152dba5f3b9 (patch)
treee82f0b18bc68262cba877543d3b93f7a94f255f7 /.github
parentfce732d3e404f06c78563fabb36cd565e2a98eab (diff)
downloadrequests-cache-5e1472b67dee6b4bddd240968a6ff152dba5f3b9.tar.gz
Use nox to run tests in GitHub Actions
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml7
-rw-r--r--.github/workflows/deploy.yml10
2 files changed, 6 insertions, 11 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index baaa09c..b16002c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,8 +9,6 @@ on:
workflow_dispatch:
env:
LATEST_PY_VERSION: '3.10'
- COVERAGE_ARGS: '--cov --cov-report=term --cov-report=xml'
- XDIST_ARGS: '--numprocesses=auto --dist=loadfile'
jobs:
# Run tests for each supported python version
@@ -34,7 +32,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- uses: snok/install-poetry@v1.3
with:
- version: 1.2.0a2
+ version: 1.2.0b1
virtualenvs-in-project: true
# Start integration test databases
@@ -61,8 +59,7 @@ jobs:
- name: Run tests
run: |
source $VENV
- pytest -rs -x tests/unit ${{ env.XDIST_ARGS }} ${{ env.COVERAGE_ARGS }}
- pytest -rs -x tests/integration --cov-append ${{ env.XDIST_ARGS }} ${{ env.COVERAGE_ARGS }}
+ nox -e cov
# Latest python version: send coverage report to codecov
- name: "Upload coverage report to Codecov"
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 9c37daf..8bc8b67 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -19,7 +19,6 @@ on:
env:
LATEST_PY_VERSION: '3.10'
- XDIST_ARGS: '--numprocesses=auto --dist=loadfile'
jobs:
# Run tests for all supported requests versions
@@ -44,7 +43,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- uses: snok/install-poetry@v1.3
with:
- version: 1.2.0a2
+ version: 1.2.0b1
virtualenvs-in-project: true
# Start integration test databases
@@ -73,9 +72,8 @@ jobs:
- name: Run tests
run: |
source $VENV
- pytest -x ${{ env.XDIST_ARGS }} tests/unit
- pytest -x ${{ env.XDIST_ARGS }} tests/integration -k 'not concurrency'
- STRESS_TEST_MULTIPLIER=10 pytest tests/integration -k 'concurrency'
+ nox -e test-current
+ nox -e stress
# Deploy stable builds on tags only, and pre-release builds from manual trigger ("workflow_dispatch")
release:
@@ -88,7 +86,7 @@ jobs:
python-version: ${{ env.LATEST_PY_VERSION }}
- uses: snok/install-poetry@v1.3
with:
- version: 1.2.0a2
+ version: 1.2.0b1
virtualenvs-in-project: true
- name: Set pre-release version