Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PROJECT="my-iris-project-478417"
IMAGE="casa-cd"
REGION="europe-west1"
DOCKER_REPO_NAME="docker"
TAG="0.1"
IMAGE_URI=${REGION}-docker.pkg.dev/${PROJECT}/${DOCKER_REPO_NAME}/${IMAGE}:${TAG}
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotenv
2 changes: 1 addition & 1 deletion .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip cython wheel
pip install -r tests/requirements.txt
pip install -r tests/test_requirements.txt

# 4. Build test image
- name: Build test Docker image
Expand Down
2 changes: 1 addition & 1 deletion api/fast.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@app.get('/')
def root():
response = {
'greeting': 'Servus, griaß di!', # This is a typical Bavarian greeting ;)
'greeting': 'Goedemorgen!',
'timestamp': datetime.now()
}

Expand Down
7 changes: 0 additions & 7 deletions app.py

This file was deleted.

4 changes: 2 additions & 2 deletions tests/test_api_root.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

class TestApiRoot(unittest.TestCase):
def test_api_root(self):
# Adding a 15s sleep timer to ensure
# Adding a 15s sleep timer to ensure
# that the container has time to start up
time.sleep(15)

# Call API and assign to a variable
url = 'http://localhost:8080'
result = requests.get(url).json()

self.assertEqual(result['greeting'], 'Servus, griaß di!')
self.assertEqual(result['greeting'], 'Goedemorgen!')
File renamed without changes.