| name: C# Tests |
| |
| on: |
| workflow_call: |
| inputs: |
| safe-checkout: |
| required: true |
| description: "The SHA key for the commit we want to run over" |
| type: string |
| |
| jobs: |
| linux: |
| name: Linux |
| runs-on: ubuntu-latest |
| steps: |
| - name: Checkout pending changes |
| uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 |
| with: |
| ref: ${{ inputs.safe-checkout }} |
| - name: Run tests |
| uses: ./.github/actions/bazel-docker |
| with: |
| image: us-docker.pkg.dev/protobuf-build/containers/test/linux/csharp:3.1.415-6.0.100-65526ea124d1034eac33e7c37cc6d65c5bef054f |
| credentials: ${{ secrets.GAR_SERVICE_ACCOUNT }} |
| bazel-cache: csharp_linux |
| bazel: test //csharp/... --action_env=DOTNET_CLI_TELEMETRY_OPTOUT=1 --test_env=DOTNET_CLI_HOME=/home/bazel |
| |
| windows: |
| name: Windows |
| runs-on: windows-2019 |
| steps: |
| - name: Checkout pending changes |
| uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0 |
| with: |
| ref: ${{ inputs.safe-checkout }} |
| |
| - name: Setup dotnet |
| uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a # v3.0.3 |
| with: |
| dotnet-version: '6.0.x' |
| |
| - name: Build |
| run: dotnet build csharp/src/Google.Protobuf.sln |
| |
| - name: Run Tests |
| run: dotnet test csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj |