Skip to content

Commit 57597ca

Browse files
authored
feat(deposition): move tests into test folder (#6879)
- Move ena tests into a test folder - stop running ena workflow tests (that talk to ENA dev on pushes to the main branch), these were often flaky but are very useful for any new ENA features so should be run on changes that affect this repo 🚀 Preview: Add `preview` label to enable
1 parent 2ffa46a commit 57597ca

19 files changed

Lines changed: 20 additions & 20 deletions

.github/workflows/ena-submission-image.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,4 @@ jobs:
103103
run: |
104104
docker run \
105105
--rm ${{ env.DOCKER_IMAGE_NAME }}:${{ env.DIR_HASH }} \
106-
pytest scripts/test_ena_submission.py
106+
pytest test/test_ena_submission.py

.github/workflows/ena-submission-unit-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,5 @@ jobs:
6464
# The integration tests are run in a separate workflow
6565
# They require postgres to be running
6666
pytest \
67-
--ignore=./scripts/test_ena_submission_integration.py \
68-
--ignore=./scripts/test_api.py
67+
--ignore=./test/test_ena_submission_integration.py \
68+
--ignore=./test/test_api.py

.github/workflows/ena-submission-workflow-tests.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
paths:
55
- "ena-submission/**"
66
- ".github/workflows/ena-submission-workflow-tests.yml"
7-
push:
8-
branches:
9-
- main
107
workflow_dispatch:
118
jobs:
129
Tests:
@@ -68,6 +65,6 @@ jobs:
6865
run: |
6966
# The unit tests are run in ena-submission-unit-tests.yaml
7067
pytest \
71-
--ignore=./scripts/test_ena_submission.py
68+
--ignore=./test/test_ena_submission.py
7269
shell: micromamba-shell {0}
7370
working-directory: ena-submission

ena-submission/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ addopts = [
4242
"--strict-config",
4343
# Remove --showlocals to avoid the massive variable output
4444
]
45-
testpaths = ["scripts"]
45+
testpaths = ["test"]
46+
pythonpath = ["scripts"]

ena-submission/test/approved_ena_submission_list_test.json renamed to ena-submission/test/data/approved_ena_submission_list_test.json

File renamed without changes.
File renamed without changes.
File renamed without changes.

ena-submission/test/get_ena_analysis_process_response.json renamed to ena-submission/test/data/get_ena_analysis_process_response.json

File renamed without changes.

ena-submission/test/test_flatfile_with_apostrophe.embl renamed to ena-submission/test/data/test_flatfile_with_apostrophe.embl

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)