E2e test setup #20
Workflow file for this run
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: End-to-End Tests | |
| on: | |
| workflow_call: {} | |
| pull_request: { branches: [main] } | |
| jobs: | |
| e2e-test: | |
| runs-on: windows-latest | |
| timeout-minutes: 60 | |
| strategy: | |
| matrix: | |
| dotnet-version: ["6.0.x", "7.0.x", "8.0.x"] | |
| fail-fast: false | |
| env: | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
| DOTNET_CLI_TELEMETRY_OPTOUT: true | |
| GITHUB_PATH: ${{ github.workspace }} | |
| GITHUB_ACTIONS: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.nuget/packages | |
| ~/.local/share/NuGet/v3-cache | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/*.props', '**/*.targets') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Prepare Mount Directory | |
| run: | | |
| mkdir -p ${{ runner.temp }}/project | |
| cp -r ./* ${{ runner.temp }}/project | |
| env: | |
| MOUNT_DIR: ${{ runner.temp }}/project | |
| - name: Setup .NET | |
| uses: xt0rted/setup-dotnet@v1.0.0 | |
| with: | |
| dotnet-version: | | |
| 6.0.x | |
| 7.0.x | |
| 8.0.x | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| vs-version: "[17.2,19.0)" | |
| - name: Install dependencies | |
| run: | | |
| dotnet tool restore | |
| dotnet restore | |
| - name: Build and Run E2E Tests | |
| run: | | |
| dotnet tool install --global Cake.Tool | |
| dotnet cake --target=TestE2E --configuration=Release --framework=${{ matrix.dotnet-version }} --verbosity=diagnostic | |
| env: | |
| MOUNT_DIR: ${{ runner.temp }}/project |