|
| 1 | +name: .NET CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ "master" ] |
| 6 | + pull_request: |
| 7 | + branches: [ "master" ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + |
| 11 | + buildAndRunBasicTests: |
| 12 | + runs-on: ubuntu-slim |
| 13 | + |
| 14 | + # env: |
| 15 | + # TODO: put env vars here |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@v4 |
| 20 | + |
| 21 | + # Install build dependencies |
| 22 | + |
| 23 | + - name: Install .NET Core |
| 24 | + uses: actions/setup-dotnet@v4 |
| 25 | + with: |
| 26 | + dotnet-version: 8.0.x |
| 27 | + - name: Setup Node.js for building JSON-to-HTML report converter |
| 28 | + uses: actions/setup-node@v6.2.0 |
| 29 | + - name: Setup Java JDK for SonarScanner |
| 30 | + uses: actions/setup-java@v5.1.0 |
| 31 | + with: |
| 32 | + java-version: 17 |
| 33 | + |
| 34 | + # Environment setup pre-build |
| 35 | + |
| 36 | + - name: Setup MSBuild.exe |
| 37 | + uses: microsoft/setup-msbuild@v2 |
| 38 | + - name: Setup SonarScanner |
| 39 | + run: dotnet tool install --global dotnet-sonarscanner |
| 40 | + - name: Setup Coverlet console |
| 41 | + run: dotnet tool install --global coverlet.console |
| 42 | + |
| 43 | + # Start SonarScanner |
| 44 | + |
| 45 | + # Build |
| 46 | + - name: Build the solution |
| 47 | + run: dotnet build --no-incremental |
| 48 | + |
| 49 | + # Test .NET (with coverage) |
| 50 | + |
| 51 | + # Test JavaScript (with coverage) |
| 52 | + |
| 53 | + # Stop SonarScanner |
| 54 | + |
| 55 | + # Upload test results artifact |
| 56 | + |
| 57 | + # Convert Screenplay reports to HTML and upload artifacts |
| 58 | + |
| 59 | + # Upload build-results artifacts |
| 60 | + |
| 61 | + buildDocs: |
| 62 | + # TODO: Build the docco site and package the result as an artifact, don't publish it |
| 63 | + |
| 64 | + publishDocs: |
| 65 | + # TODO: Take the docco site artifact and publish it to master |
| 66 | + |
| 67 | + runBrowserTests: |
| 68 | + # TODO: Use build-results artifacts and run tests on matrix of browsers |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + # - name: Execute unit tests |
| 80 | + # run: dotnet test |
| 81 | + |
| 82 | + # # Restore the application to populate the obj folder with RuntimeIdentifiers |
| 83 | + # - name: Restore the application |
| 84 | + # run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration |
| 85 | + # env: |
| 86 | + # Configuration: ${{ matrix.configuration }} |
| 87 | + |
| 88 | + # # Decode the base 64 encoded pfx and save the Signing_Certificate |
| 89 | + # - name: Decode the pfx |
| 90 | + # run: | |
| 91 | + # $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.Base64_Encoded_Pfx }}") |
| 92 | + # $certificatePath = Join-Path -Path $env:Wap_Project_Directory -ChildPath GitHubActionsWorkflow.pfx |
| 93 | + # [IO.File]::WriteAllBytes("$certificatePath", $pfx_cert_byte) |
| 94 | + |
| 95 | + # # Create the app package by building and packaging the Windows Application Packaging project |
| 96 | + # - name: Create the app package |
| 97 | + # run: msbuild $env:Wap_Project_Path /p:Configuration=$env:Configuration /p:UapAppxPackageBuildMode=$env:Appx_Package_Build_Mode /p:AppxBundle=$env:Appx_Bundle /p:PackageCertificateKeyFile=GitHubActionsWorkflow.pfx /p:PackageCertificatePassword=${{ secrets.Pfx_Key }} |
| 98 | + # env: |
| 99 | + # Appx_Bundle: Always |
| 100 | + # Appx_Bundle_Platforms: x86|x64 |
| 101 | + # Appx_Package_Build_Mode: StoreUpload |
| 102 | + # Configuration: ${{ matrix.configuration }} |
| 103 | + |
| 104 | + # # Remove the pfx |
| 105 | + # - name: Remove the pfx |
| 106 | + # run: Remove-Item -path $env:Wap_Project_Directory\GitHubActionsWorkflow.pfx |
| 107 | + |
| 108 | + # # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact |
| 109 | + # - name: Upload build artifacts |
| 110 | + # uses: actions/upload-artifact@v4 |
| 111 | + # with: |
| 112 | + # name: MSIX Package |
| 113 | + # path: ${{ env.Wap_Project_Directory }}\AppPackages |
0 commit comments