-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Abhahn/sql server private preview (#874)
- Loading branch information
Showing
10 changed files
with
108 additions
and
12 deletions.
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,29 @@ | ||
name: Docker Image Build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Azure Container Registry Login | ||
uses: Azure/docker-login@v1 | ||
with: | ||
# Container registry username | ||
username: ${{ secrets.SAMPLEAPP_ACR_USERNAME }} | ||
# Container registry password | ||
password: ${{ secrets.SAMPLEAPP_ACR_PASSWORD }} | ||
# Container registry server url | ||
login-server: sampleappaoaichatgpt.azurecr.io | ||
|
||
- uses: actions/checkout@v3 | ||
- name: Build the Docker image | ||
run: | ||
docker build . --file WebApp.Dockerfile --tag sampleappaoaichatgpt.azurecr.io/sample-app-aoai-chatgpt:$(date +'%Y-%m-%d')_$GITHUB_RUN_NUMBER | ||
|
2 changes: 1 addition & 1 deletion
2
.github/workflows/docker-image.yml → .github/workflows/docker-image-publish.yml
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Docker Image CI | ||
name: Docker Image Publish | ||
|
||
on: | ||
push: | ||
|
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
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
@echo off | ||
|
||
set NODE_OPTIONS=--max_old_space_size=8192 | ||
|
||
echo. | ||
echo Restoring backend python packages | ||
echo. | ||
|
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,40 @@ | ||
import os | ||
import pytest | ||
import sys | ||
|
||
from subprocess import Popen, TimeoutExpired | ||
from time import sleep | ||
|
||
|
||
script_base_path = os.path.dirname( | ||
os.path.dirname( | ||
os.path.dirname(__file__) | ||
) | ||
) | ||
|
||
script_timeout = 240 | ||
|
||
@pytest.fixture(scope="function") | ||
def script_command(): | ||
if sys.platform.startswith("linux"): | ||
return "./start.sh" | ||
|
||
else: | ||
return "./start.cmd" | ||
|
||
|
||
def test_startup_script(script_command): | ||
stdout = None | ||
try: | ||
p = Popen([script_command], cwd=script_base_path) | ||
stdout, _ = p.communicate(timeout=script_timeout) | ||
|
||
except TimeoutExpired: | ||
assert isinstance(stdout, str) | ||
assert "127.0.0.1:50505" in stdout | ||
p.terminate() | ||
|
||
|
||
|
||
|
||
|