Skip to content

Commit 211228f

Browse files
committed
Move tests and their dependencies to 'tests/'
It's sometimes inconvenient and not obvious enough that tests dependencies were listed in the CI pipeline, and duplicated between jobs. In order to make sure it's easy enough to install those locally, and make sure they ain't duplicated between jobs, we better move them into its own requirements.txt file. Since requirements.txt is about tests, we also better isolated both requirements.txt and test_action.py in its own separate directory, the 'tests/' directory.
1 parent 4a2dab2 commit 211228f

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ jobs:
4040

4141
- name: Run tests
4242
run: |
43-
python3 -m pip install --upgrade pip pytest psycopg furl cryptography
44-
python3 -m pytest -vv test_action.py
43+
python3 -m pip install -r tests/requirements.txt
44+
python3 -m pytest -vv tests/test_action.py
4545
env:
4646
CONNECTION_URI: ${{ steps.postgres.outputs.connection-uri }}
4747
SERVICE_NAME: ${{ steps.postgres.outputs.service-name }}
@@ -88,8 +88,8 @@ jobs:
8888

8989
- name: Run tests
9090
run: |
91-
python3 -m pip install --upgrade pip pytest psycopg furl cryptography
92-
python3 -m pytest -vv test_action.py
91+
python3 -m pip install -r tests/requirements.txt
92+
python3 -m pytest -vv tests/test_action.py
9393
env:
9494
CONNECTION_URI: ${{ steps.postgres.outputs.connection-uri }}
9595
SERVICE_NAME: ${{ steps.postgres.outputs.service-name }}

tests/requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cryptography
2+
furl
3+
psycopg
4+
pytest
File renamed without changes.

0 commit comments

Comments
 (0)