quick fixes #36
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
name: RUN_E2E_TESTS_NODE20_WCON | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
- releases/* | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
permissions: | |
id-token: write | |
env: | |
AZURE_FUNCTIONAPP_NAME: gae-fa-node20-wcon | |
AZURE_FUNCTIONAPP_PACKAGE_PATH: './tests/e2e/node20' | |
NODE_VERSION: '20.x' | |
jobs: | |
run: | |
name: Run E2E Tests | |
runs-on: windows-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 Node ${{ env.NODE_VERSION }} Environment | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: E2E Resolve Project Dependencies Using Npm | |
shell: bash | |
run: | | |
pushd '${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}' | |
npm install | |
npm run build --if-present | |
npm run test --if-present | |
echo "$GITHUB_SHA" > sha.txt | |
popd | |
- name: 'Login via Azure CLI' | |
uses: azure/login@v1 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID_FA_NODE20_WCON }} | |
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 }} | |
scm-do-build-during-deployment: true | |
- 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 |