-
Notifications
You must be signed in to change notification settings - Fork 84
Expand file tree
/
Copy pathrun-e2e-tests-dotnet6-lcon.yaml
More file actions
88 lines (77 loc) · 2.24 KB
/
run-e2e-tests-dotnet6-lcon.yaml
File metadata and controls
88 lines (77 loc) · 2.24 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: RUN_E2E_TESTS_DOTNET6_LCON
on:
push:
branches:
- master
- dev
- releases/*
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
permissions:
id-token: write
env:
AZURE_FUNCTIONAPP_NAME: gae-fa-dotnet6-lcon
AZURE_FUNCTIONAPP_PACKAGE_PATH: './tests/e2e/dotnet6'
DOTNET_VERSION: '6.0.428'
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: 1
jobs:
run:
name: Run E2E Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set Node.js 20.x for GitHub Action
uses: actions/setup-node@v1
with:
node-version: 20.x
- name: Run Npm Install for GitHub Action
run: npm install
- name: Build GitHub Action
run: npm run build
- name: E2E Setup DotNet ${{ env.DOTNET_VERSION }} Environment
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: E2E Resolve Project Dependencies Using Dotnet
shell: pwsh
run: |
pushd '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
$buildOutput = dotnet build --configuration Release --output ./output
if ($buildOutput -contains "Build succeeded") {
Write-Host "Build succeeded"
} else {
Write-Host "Build failed"
Write-Host "Error Output: $buildOutput"
}
echo "$env:GITHUB_SHA" > ./output/sha.txt
popd
- name: 'Login via Azure CLI'
uses: azure/login@v1
with:
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_DOTNET3_LCON }}
tenant-id: ${{ secrets.AZURE_TENANT_ID_FA_E2E_TESTS }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID_FA_E2E_TESTS }}
- name: E2E Run Azure Functions Action
uses: ./
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output'
- name: E2E Check HttpTrigger Result
shell: pwsh
run: |
$i = 0
while ($i -lt 10) {
sleep 10
$RESPONSE = $(curl "${{ steps.fa.outputs.app-url }}/api/HttpTrigger")
$RESULT = ($RESPONSE -eq "$env:GITHUB_SHA")
if ($RESULT) {
exit 0
}
$i = $i + 1
}
exit 1