Skip to content

Commit

Permalink
adds requirements to testenv
Browse files Browse the repository at this point in the history
  • Loading branch information
BWMac committed Jan 8, 2024
1 parent c1b46e6 commit 1bbe643
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 29 deletions.
52 changes: 24 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ concurrency:
jobs:
prepare:
runs-on: ubuntu-latest
# outputs:
# wheel-path: ${{ steps.distribution-paths.outputs.wheel }}
# tarball-path: ${{ steps.distribution-paths.outputs.tarball }}
outputs:
wheel-path: ${{ steps.distribution-paths.outputs.wheel }}
tarball-path: ${{ steps.distribution-paths.outputs.tarball }}
steps:
- uses: actions/checkout@v3
with: {fetch-depth: 0} # deep clone for setuptools-scm
Expand All @@ -38,22 +38,22 @@ jobs:
run: pipx run pre-commit run --all-files --show-diff-on-failure
- name: Install tox-gh plugin
run: python -m pip install tox-gh>=1.2
# - name: Build package distribution files
# run: tox -e clean,build
# - name: Record the paths of wheel and source tarball distributions
# id: distribution-paths
# run: |
# echo "wheel=$(ls dist/*.whl)" >> $GITHUB_OUTPUT
# echo "tarball=$(ls dist/*.tar.gz)" >> $GITHUB_OUTPUT
# - name: Store the distribution files for use in other stages
# # `tests`, `pypi-publish`, and `docker-publish` will use the same
# # pre-built distributions, so we make sure to release the exact
# # same package that was tested
# uses: actions/upload-artifact@v3
# with:
# name: python-distribution-files
# path: dist/
# retention-days: 1
- name: Build package distribution files
run: tox -e clean,build
- name: Record the paths of wheel and source tarball distributions
id: distribution-paths
run: |
echo "wheel=$(ls dist/*.whl)" >> $GITHUB_OUTPUT
echo "tarball=$(ls dist/*.tar.gz)" >> $GITHUB_OUTPUT
- name: Store the distribution files for use in other stages
# `tests`, `pypi-publish`, and `docker-publish` will use the same
# pre-built distributions, so we make sure to release the exact
# same package that was tested
uses: actions/upload-artifact@v3
with:
name: python-distribution-files
path: dist/
retention-days: 1
# Prevent scheduled workflow from ever being paused
- name: Keepalive Workflow
uses: gautamkrishnar/[email protected]
Expand All @@ -80,25 +80,21 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
# - uses: actions/download-artifact@v3
# with: {name: python-distribution-files, path: dist/}
- uses: actions/download-artifact@v3
with: {name: python-distribution-files, path: dist/}
- name: Install tox-gh plugin
run: python -m pip install tox-gh>=1.2
- name: Setup test suite
run: tox -vv --notest
- name: Install dependencies
run: ./dev_setup.sh ${{ matrix.python }}
- name: activate venv
run: source py-orca-venv-${{ matrix.python }}/bin/activate
- name: Run tests
env:
# New variables should match a `passenv` pattern under `[testenv]` in tox.ini
SEVENBRIDGES_CONNECTION_URI: ${{ secrets.SEVENBRIDGES_CONNECTION_URI }}
NEXTFLOWTOWER_CONNECTION_URI: ${{ secrets.NEXTFLOWTOWER_CONNECTION_URI }}
SYNAPSE_CONNECTION_URI: ${{ secrets.SYNAPSE_CONNECTION_URI }}
run: pytest -vv
# >-
# tox -- -rFEx --durations 10 --color yes
run: >-
tox --installpkg '${{ needs.prepare.outputs.wheel-path }}'
-- -rFEx --durations 10 --color yes
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ passenv =
HOME
*_CONNECTION_URI
SETUPTOOLS_*
deps =
-r {toxinidir}/requirements-airflow.txt
extras =
testing
all
Expand Down Expand Up @@ -48,7 +50,6 @@ skip_install = True
changedir = {toxinidir}
deps =
build: build[virtualenv]
-r {toxinidir}/requirements-airflow.txt
passenv =
SETUPTOOLS_*
commands =
Expand Down

0 comments on commit 1bbe643

Please sign in to comment.