Skip to content
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

Refactoring changes to prep for API v2.0 #7

Merged
merged 20 commits into from
Apr 16, 2023
Merged
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
77 changes: 77 additions & 0 deletions .github/workflows/dev_pomandhoneyapidev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy ASP.Net Core app to Azure Web App - PomAndHoneyApiDev

on:
push:
branches:
- dev
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.x'
include-prerelease: true

- name: Build with dotnet
run: dotnet build --configuration Release

- name: dotnet publish
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp

test:
runs-on: windows-latest
needs: build

steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.x'
include-prerelease: true

- name: Restore packages
run: dotnet restore

- name: Run NUnit tests
run: dotnet test ./Tests/Tests.csproj

deploy:
runs-on: windows-latest
needs: test

environment:
name: 'Dev'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'PomAndHoneyApiDev'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_BD9C09508286444E97323C2CDFD0BA4E }}
package: .
160 changes: 80 additions & 80 deletions .github/workflows/master_pomandhoneyapi.yml
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
name: Build, Test and Deploy ASP.Net Core app to Azure Web App - PomAndHoneyAPI
on:
push:
branches:
- master
workflow_dispatch:
jobs:
test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.x'
include-prerelease: true
- name: Restore packages
run: dotnet restore
- name: Set Environment Variables
run: |
echo "PSQL_DB_PASSWORD=${{ secrets.PSQL_DB_PASSWORD }}" >> $env:GITHUB_ENV
- name: Run NUnit tests
run: dotnet test ./Tests/Tests.csproj
build:
runs-on: windows-latest
needs: test
steps:
- uses: actions/checkout@v2
- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.x'
include-prerelease: true
- name: Restore packages
run: dotnet restore
- name: Build with dotnet
run: dotnet build --configuration Release
- name: dotnet publish
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp
deploy:
runs-on: windows-latest
needs: build
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'PomAndHoneyAPI'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_974B64E2EEDB4B198B73F273C2B7FB36 }}
package: .
name: Build, Test and Deploy ASP.Net Core app to Azure Web App - PomAndHoneyAPI

on:
push:
branches:
- master
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.x'
include-prerelease: true

- name: Restore packages
run: dotnet restore

- name: Build with dotnet
run: dotnet build --configuration Release

- name: dotnet publish
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp
test:
runs-on: windows-latest
needs: build

steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.x'
include-prerelease: true

- name: Restore packages
run: dotnet restore

- name: Set Environment Variables
run: |
echo "PSQL_DB_PASSWORD=${{ secrets.PSQL_DB_PASSWORD }}" >> $env:GITHUB_ENV

- name: Run NUnit tests
run: dotnet test ./Tests/Tests.csproj

deploy:
runs-on: windows-latest
needs: test
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'PomAndHoneyAPI'
slot-name: 'Production'
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_974B64E2EEDB4B198B73F273C2B7FB36 }}
package: .
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
bin/
obj/
.vs/
.vs/
appsettings.json
Loading