forked from Itera/graduate-case-base
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add restaurant, spa, excursion
- Loading branch information
Showing
253 changed files
with
36,719 additions
and
76 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,47 @@ | ||
name: Build and deploy excursion api | ||
run-name: Build and deploy excursion api | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
paths: | ||
- 'excursion/api/**' | ||
|
||
env: | ||
DOTNET_APP_LOCATION: excursion/api | ||
DOTNET_APP_NAME: Explore.Excursion | ||
OUTPUT_LOCATION: ${{ github.workspace }}/outputs/api | ||
|
||
jobs: | ||
build: | ||
name: Build function app | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build function app | ||
uses: ./.github/actions/build-dotnet-app | ||
with: | ||
app_location: ${{ env.DOTNET_APP_LOCATION }} | ||
app_name: ${{ env.DOTNET_APP_NAME }} | ||
output_location: ${{ env.OUTPUT_LOCATION }} | ||
|
||
deploy-dev: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
environment: dev | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Deploy function app | ||
uses: ./.github/actions/deploy-azure-function-app | ||
with: | ||
app_location: ${{ env.OUTPUT_LOCATION }} | ||
app_artifact_name: ${{ env.DOTNET_APP_NAME }} | ||
app_name: ${{ vars.API_FUNCTION_APP_NAME_EXCURSION }} | ||
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} |
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,47 @@ | ||
name: Build and deploy restaurant api | ||
run-name: Build and deploy restaurant api | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
paths: | ||
- 'restaurant/api/**' | ||
|
||
env: | ||
DOTNET_APP_LOCATION: restaurant/api | ||
DOTNET_APP_NAME: Explore.Restaurant | ||
OUTPUT_LOCATION: ${{ github.workspace }}/outputs/api | ||
|
||
jobs: | ||
build: | ||
name: Build function app | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build function app | ||
uses: ./.github/actions/build-dotnet-app | ||
with: | ||
app_location: ${{ env.DOTNET_APP_LOCATION }} | ||
app_name: ${{ env.DOTNET_APP_NAME }} | ||
output_location: ${{ env.OUTPUT_LOCATION }} | ||
|
||
deploy-dev: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
environment: dev | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Deploy function app | ||
uses: ./.github/actions/deploy-azure-function-app | ||
with: | ||
app_location: ${{ env.OUTPUT_LOCATION }} | ||
app_artifact_name: ${{ env.DOTNET_APP_NAME }} | ||
app_name: ${{ vars.API_FUNCTION_APP_NAME_RESTAURANT }} | ||
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }} |
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,62 @@ | ||
name: Build and deploy excursion web | ||
run-name: Build and deploy excursion web | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
paths: | ||
- 'excursion/web/**' | ||
|
||
env: | ||
WEB_APP_LOCATION: excursion/web | ||
WEB_APP_ARTIFACT_LOCATION: dist # relative to WEB_APP_LOCATION | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
working-directory: ${{ env.WEB_APP_LOCATION }} | ||
run: | | ||
npm ci | ||
- name: Build project | ||
shell: bash | ||
working-directory: ${{ env.WEB_APP_LOCATION }} | ||
run: | | ||
npm run build | ||
deploy-dev: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
environment: dev | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to Azure | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.azure_credentials }} | ||
|
||
- name: Build and Deploy web app | ||
uses: Azure/static-web-apps-deploy@v1 | ||
env: | ||
VITE_AUTH_CLIENT_ID: ${{ vars.VITE_AUTH_CLIENT_ID_EXCURSION }} | ||
VITE_API_BASE_URL: ${{ vars.VITE_API_BASE_URL_EXCURSION }} | ||
VITE_API_SCOPE: ${{ vars.VITE_API_SCOPE_EXCURSION }} | ||
with: | ||
azure_static_web_apps_api_token: ${{ secrets.WEBAPP_DEPLOYMENT_TOKEN_EXCURSION }} | ||
repo_token: ${{ secrets.github_token }} | ||
action: "upload" | ||
app_location: ${{ env.WEB_APP_LOCATION }} | ||
app_artifact_location: ${{ env.WEB_APP_ARTIFACT_LOCATION }} |
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,62 @@ | ||
name: Build and deploy spa web | ||
run-name: Build and deploy spa web | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
paths: | ||
- 'restaurant/web/**' | ||
|
||
env: | ||
WEB_APP_LOCATION: restaurant/web | ||
WEB_APP_ARTIFACT_LOCATION: dist # relative to WEB_APP_LOCATION | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
working-directory: ${{ env.WEB_APP_LOCATION }} | ||
run: | | ||
npm ci | ||
- name: Build project | ||
shell: bash | ||
working-directory: ${{ env.WEB_APP_LOCATION }} | ||
run: | | ||
npm run build | ||
deploy-dev: | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
environment: dev | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to Azure | ||
uses: azure/login@v1 | ||
with: | ||
creds: ${{ secrets.azure_credentials }} | ||
|
||
- name: Build and Deploy web app | ||
uses: Azure/static-web-apps-deploy@v1 | ||
env: | ||
VITE_AUTH_CLIENT_ID: ${{ vars.VITE_AUTH_CLIENT_ID_SPA }} | ||
VITE_API_BASE_URL: ${{ vars.VITE_API_BASE_URL_SPA }} | ||
VITE_API_SCOPE: ${{ vars.VITE_API_SCOPE_SPA }} | ||
with: | ||
azure_static_web_apps_api_token: ${{ secrets.WEBAPP_DEPLOYMENT_TOKEN_RESTAURANT }} | ||
repo_token: ${{ secrets.github_token }} | ||
action: "upload" | ||
app_location: ${{ env.WEB_APP_LOCATION }} | ||
app_artifact_location: ${{ env.WEB_APP_ARTIFACT_LOCATION }} |
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 @@ | ||
name: Build and test excursion api | ||
run-name: Build and test excursion api | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- 'excursion/api/**' | ||
|
||
env: | ||
DOTNET_APP_LOCATION: excursion/api | ||
DOTNET_APP_NAME: Explore.Excursion | ||
OUTPUT_LOCATION: ${{ github.workspace }}/outputs/api | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build api | ||
uses: ./.github/actions/build-dotnet-app | ||
with: | ||
app_location: ${{ env.DOTNET_APP_LOCATION }} | ||
app_name: ${{ env.DOTNET_APP_NAME }} | ||
output_location: ${{ env.OUTPUT_LOCATION }} | ||
|
||
test: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Run tests | ||
uses: ./.github/actions/test-dotnet-app | ||
with: | ||
app_location: ${{ env.DOTNET_APP_LOCATION }} |
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 @@ | ||
name: Build and test restaurant api | ||
run-name: Build and test restaurant api | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- 'restaurant/api/**' | ||
|
||
env: | ||
DOTNET_APP_LOCATION: restaurant/api | ||
DOTNET_APP_NAME: Explore.Restaurant | ||
OUTPUT_LOCATION: ${{ github.workspace }}/outputs/api | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build api | ||
uses: ./.github/actions/build-dotnet-app | ||
with: | ||
app_location: ${{ env.DOTNET_APP_LOCATION }} | ||
app_name: ${{ env.DOTNET_APP_NAME }} | ||
output_location: ${{ env.OUTPUT_LOCATION }} | ||
|
||
test: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Run tests | ||
uses: ./.github/actions/test-dotnet-app | ||
with: | ||
app_location: ${{ env.DOTNET_APP_LOCATION }} |
10 changes: 5 additions & 5 deletions
10
.github/workflows/build-and-test-api.yaml → ...hub/workflows/build-and-test-api-spa.yaml
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
8 changes: 4 additions & 4 deletions
8
.github/workflows/build-and-test-webapp.yaml → ...lows/build-and-test-webapp-excursion.yaml
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.