-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (24 loc) · 926 Bytes
/
workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Build, Test, and Deploy to Azure Function App
on:
pull_request:
branches: ["main"]
env:
AZURE_FUNCTIONAPP_NAME: 'AzureHyperScaleElasticPoolAutoScaler'
AZURE_FUNCTIONAPP_PACKAGE_PATH: 'Azure.HyperScale.ElasticPool.AutoScaler'
DOTNET_VERSION: '8.0.x'
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
- name: Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
- name: Build project
run: dotnet build ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }} --configuration Release --no-restore
- name: Run Tests
run: dotnet test Azure.HyperScale.ElasticPool.AutoScaler.Tests --configuration Release