Skip to content

Commit

Permalink
Reconfigure dependabot
Browse files Browse the repository at this point in the history
Reconfigures depenadabot to look at the requriements_tests.txt file.

This is necesary in order that the triggered tests run in an environment
where the installed dependencies reflect the bumped versions! (#100).
  • Loading branch information
maread99 committed Jul 3, 2023
1 parent 23443b8 commit dfb8ad5
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2
updates:
# Configuration for pip
- package-ecosystem: "pip" # See documentation for possible values
directory: "/etc/requirements" # Location of package manifests
directory: "/etc/requirements_dependabot" # Location of package manifests
schedule:
interval: "daily"
# for reference:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'etc/requirements_tests.txt'
cache-dependency-path: 'etc/requirements_dependabot/requirements_tests.txt'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r etc/requirements_tests.txt
pip install -r etc/requirements_dependabot/requirements_tests.txt
pip install -e .
- name: Lint with flake8
# fail it if doesn't pass flake8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
while [ $i -lt 12 ] && [ "${{ github.ref_name }}" != $(pip index versions -i https://test.pypi.org/simple --pre market_prices | cut -d'(' -f2 | cut -d')' -f1 | sed 1q) ];\
do echo "waiting for package to appear in test index, i is $i, sleeping 5s"; sleep 5s; echo "woken up"; ((i++)); echo "next i is $i"; done
pip install --index-url https://test.pypi.org/simple market_prices==${{ github.ref_name }} --no-deps
pip install -r etc/requirements/requirements.txt
pip install -r etc/requirements.txt
python -c 'import market_prices;print(market_prices.__version__)'
- name: Clean pip
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions etc/requirements/why_here.txt

This file was deleted.

File renamed without changes.
8 changes: 8 additions & 0 deletions etc/requirements_dependabot/why_here.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
requirements_test.txt is in this dedicated directory simply so that
dependabot can be configured to look only at thses dependencies and ignore
the additional requirements in requirements_dev.txt.

Dependabot has to look at requirements_test.txt, as opposed to simply
requirements.txt, in order that the tests triggered by the dependabot PR
run in an environment that has installed the bumped versions of the
dependencies.

0 comments on commit dfb8ad5

Please sign in to comment.