Accept timeout as valid failure for output permission test #148
This file contains hidden or 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: CI Build and test | |
| on: | |
| push: | |
| branches: [ "**" ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: build | |
| permissions: | |
| checks: write | |
| pull-requests: write | |
| id-token: write | |
| contents: read | |
| strategy: | |
| matrix: | |
| dotnet-version: ['6.0.x'] | |
| steps: | |
| - name: Azure login | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ secrets.APP_ID }} | |
| tenant-id: ${{ secrets.TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: "Run az commands" | |
| run: | | |
| access_token=$(az account get-access-token --resource=https://kusto.kusto.windows.net --query accessToken -o tsv) | |
| echo "ACCESS_TOKEN=$access_token" >> $GITHUB_ENV | |
| - uses: actions/checkout@v3 | |
| - name: Setup dotnet | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: Install dependencies | |
| run: dotnet restore | |
| - name: Test with dotnet | |
| run: dotnet test --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}" | |
| env: | |
| KustoConnectionString: "Data Source=${{secrets.CLUSTER}};Database=${{vars.TestDatabaseName}};Fed=True;UserToken=${{env.ACCESS_TOKEN}}" | |
| KustoConnectionStringNoPermissions: "Data Source=${{secrets.CLUSTER}};Database=${{vars.TestDatabaseNameNoPermissions}};Fed=True;UserToken=${{env.ACCESS_TOKEN}}" | |
| KustoConnectionStringMSI: "Data Source=${{secrets.CLUSTER}};Database=${{vars.TestDatabaseName}};Fed=True;" | |
| KustoConnectionStringInvalidAttributes: "Data Source=${{secrets.CLUSTER}};Database=${{vars.TestDatabaseName}};Fed=True;AppClientId=${{ secrets.APP_ID }}" | |
| TestDatabaseName: "${{vars.TestDatabaseName}}" | |
| TestDatabaseNameNoPermissions: "${{vars.TestDatabaseNameNoPermissions}}" | |
| - name: Upload dotnet test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dotnet-results-${{ matrix.dotnet-version }} | |
| path: TestResults-${{ matrix.dotnet-version }} | |
| # Use always() to always run this step to publish test results when there are test failures | |
| if: ${{ always() }} | |