-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Endpoint tests with Sumo data #710
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
72e1511
Endpoint tests
HansKallekleiv a83b98e
fix
HansKallekleiv fa48473
bandit
HansKallekleiv 0259f4b
bandit
HansKallekleiv eab0bad
fix deps
HansKallekleiv 7f488ae
wip
HansKallekleiv f801cb7
wip
HansKallekleiv 395d71e
wip
HansKallekleiv 8680b93
wip
HansKallekleiv a04a763
wip
HansKallekleiv 54c2974
wip
HansKallekleiv 9fd63d2
wip
HansKallekleiv 05147b8
bump
HansKallekleiv 96f3bd3
Update .github/workflows/backend_sumo_prod.yml
HansKallekleiv 8a75ede
wip
HansKallekleiv 804300e
wip
HansKallekleiv 1d222ec
wip
HansKallekleiv 5d6d95f
wip
HansKallekleiv b6c5829
wip
HansKallekleiv 7612d93
wip
HansKallekleiv ac694fd
wip
HansKallekleiv ad372e8
update api
HansKallekleiv e3e2fee
wip
HansKallekleiv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: integration | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
sumo_prod: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: 🤖 Get shared key from Sumo | ||
working-directory: ./backend_py/primary | ||
env: | ||
SHARED_KEY_SUMO_PROD: ${{ secrets.SHARED_KEY_DROGON_READ_PROD }} | ||
run: | | ||
if [ ${#SHARED_KEY_SUMO_PROD} -eq 0 ]; then | ||
echo "Error: SHARED_KEY_SUMO_PROD is empty. Stopping the action." | ||
exit 1 | ||
fi | ||
mkdir ~/.sumo | ||
echo $SHARED_KEY_SUMO_PROD > ~/.sumo/9e5443dd-3431-4690-9617-31eed61cb55a.sharedkey | ||
|
||
- name: 🐍 Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: pip | ||
|
||
- name: 📦 Install poetry and dependencies | ||
working-directory: ./backend_py/primary | ||
run: | | ||
pip install --upgrade pip | ||
pip install poetry==1.8.5 # Pin Poetry to version 1.8.5 | ||
poetry config virtualenvs.create false | ||
poetry check --lock # Check lock file is consistent with pyproject.toml | ||
poetry install --with dev | ||
|
||
- name: 🤖 Run tests | ||
working-directory: ./backend_py/primary | ||
env: | ||
WEBVIZ_CLIENT_SECRET: 0 | ||
WEBVIZ_SMDA_SUBSCRIPTION_KEY: 0 | ||
WEBVIZ_SMDA_RESOURCE_SCOPE: 0 | ||
WEBVIZ_VDS_HOST_ADDRESS: 0 | ||
WEBVIZ_ENTERPRISE_SUBSCRIPTION_KEY: 0 | ||
WEBVIZ_SSDL_RESOURCE_SCOPE: 0 | ||
WEBVIZ_SUMU_ENV: prod | ||
run: | | ||
pytest -s --timeout=300 ./tests/integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from typing import Sequence | ||
|
||
from pydantic import BaseModel | ||
|
||
|
||
class FieldInfo(BaseModel): | ||
field_identifier: str | ||
|
||
|
||
class CaseInfo(BaseModel): | ||
uuid: str | ||
name: str | ||
status: str | ||
user: str | ||
|
||
|
||
class EnsembleInfo(BaseModel): | ||
name: str | ||
realization_count: int | ||
|
||
|
||
class EnsembleDetails(BaseModel): | ||
name: str | ||
field_identifier: str | ||
case_name: str | ||
case_uuid: str | ||
realizations: Sequence[int] | ||
stratigraphic_column_identifier: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is test-folder excluded now?