diff options
author | Jordan Cook <jordan.cook@pioneer.com> | 2022-04-22 14:44:37 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook@pioneer.com> | 2022-04-22 14:44:39 -0500 |
commit | f9082fe0d3f31037ce2ef6f63d4ec43ce442aec6 (patch) | |
tree | 2b59bbecf1b25b4ca7e988ff5329335bdb4438a4 /.github | |
parent | 5ff3f01ee93d249cc443af74cc310d43791645ea (diff) | |
download | requests-cache-f9082fe0d3f31037ce2ef6f63d4ec43ce442aec6.tar.gz |
Defore deployments, run a separate CI job for unit tests with no optional dependencies installed
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/deploy.yml | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8d51a8d..2253a80 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -77,9 +77,41 @@ jobs: nox -e test-current nox -e stress -- ${{ env.STRESS_TEST_MULTIPLIER }} + # Run unit tests without any optional dependencies installed + test-minimum-deps: + runs-on: ubuntu-latest + + steps: + # Set up python + poetry + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + with: + python-version: ${{ env.LATEST_PY_VERSION }} + - uses: snok/install-poetry@v1.3 + with: + version: 1.2.0b1 + virtualenvs-in-project: true + + # Cache packages per python version, and reuse until lockfile changes + - name: Cache python packages + id: cache + uses: actions/cache@v3 + with: + path: .venv + key: venv-${{ matrix.python-version }}-latest-minimum-deps-${{ hashFiles('poetry.lock') }} + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: poetry install -v + + - name: Run unit tests with no optional dependencies + run: | + source $VENV + pytest -n auto tests/unit + + # Deploy stable builds on tags only, and pre-release builds from manual trigger ("workflow_dispatch") release: - needs: [test] + needs: [test, test-minimum-deps] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 |