diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index bb61936..cd3d704 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -84,35 +84,39 @@ jobs: path: examples/with-${{ matrix.runtime }}/.nmt/dist retention-days: 1 + deploy: + runs-on: ubuntu-latest + needs: + - build + - get-matrix + timeout-minutes: 10 + strategy: + matrix: + include: ${{fromJson(needs.get-matrix.outputs.deployable_matrix)}} + + steps: - name: Azure Login uses: azure/login@v2 - if: matrix.is_deployable == true with: creds: ${{ secrets.AZURE_CREDENTIALS_E2E_TESTS }} + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.resource_identifier_key }} + - name: Deploy to Azure Functions uses: Azure/functions-action@v1 - if: matrix.is_deployable == true with: app-name: nmt-e2e-${{ matrix.target }}-${{ secrets[matrix.resource_identifier_key] }} - package: examples/with-${{ matrix.runtime }}/.nmt/dist - - # - name: Wait for the deployment to finish - # if: matrix.is_deployable == true - # run: sleep 15 - - # - name: Run E2E tests - # if: matrix.is_deployable == true - # run: pnpm exec nx run @infra/azure-functions:test - # env: - # AZURE_FUNCTIONS_URL: https://nmt-e2e-${{ matrix.target }}-${{ secrets[matrix.resource_identifier_key] }}.azurewebsites.net - # AZURE_FUNCTIONS_API_KEY: ${{ secrets.AZURE_FUNCTIONS_HOST_KEY }} - + package: . + e2e: if: always() runs-on: ubuntu-latest needs: - build + - deploy - get-matrix timeout-minutes: 10 strategy: