|
| 1 | +name: rabbitmq-dotnet-client |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ 6.x ] |
| 6 | + pull_request: |
| 7 | + branches: [ 6.x ] |
| 8 | + |
| 9 | +jobs: |
| 10 | + build-win32: |
| 11 | + name: build/test on windows-latest |
| 12 | + |
| 13 | + runs-on: windows-latest |
| 14 | + |
| 15 | + # https://github.com/NuGet/Home/issues/11548 |
| 16 | + env: |
| 17 | + NUGET_CERT_REVOCATION_MODE: offline |
| 18 | + |
| 19 | + steps: |
| 20 | + - name: Clone repository |
| 21 | + uses: actions/checkout@v2 |
| 22 | + with: |
| 23 | + submodules: true |
| 24 | + - name: Cache installers |
| 25 | + uses: actions/cache@v2 |
| 26 | + with: |
| 27 | + # Note: the cache path is relative to the workspace directory |
| 28 | + # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#using-the-cache-action |
| 29 | + path: ~/installers |
| 30 | + key: ${{ runner.os }}-v0-${{ hashFiles('tools/versions.json') }} |
| 31 | + - name: Cache NuGet packages |
| 32 | + uses: actions/cache@v2 |
| 33 | + with: |
| 34 | + path: | |
| 35 | + ~/.nuget/packages |
| 36 | + ~/AppData/Local/NuGet/v3-cache |
| 37 | + key: ${{ runner.os }}-v0-nuget-${{ hashFiles('**/*.csproj') }} |
| 38 | + restore-keys: | |
| 39 | + ${{ runner.os }}-v0-nuget- |
| 40 | + - name: Install and start RabbitMQ |
| 41 | + run: ./tools/install.ps1 |
| 42 | + - name: List NuGet sources |
| 43 | + run: dotnet nuget locals all --list |
| 44 | + - name: Restore |
| 45 | + run: dotnet restore --verbosity=normal |
| 46 | + - name: ApiGen |
| 47 | + run: dotnet run --project ./projects/Apigen/Apigen.csproj --apiName:AMQP_0_9_1 ./projects/specs/amqp0-9-1.stripped.xml ./gensrc/autogenerated-api-0-9-1.cs |
| 48 | + - name: Build |
| 49 | + run: dotnet build --no-restore --verbosity=normal |
| 50 | + - name: Test |
| 51 | + run: ./tools/gha-run-tests.ps1 |
| 52 | + |
| 53 | + build: |
| 54 | + name: build/test on ubuntu-latest |
| 55 | + |
| 56 | + runs-on: ubuntu-latest |
| 57 | + |
| 58 | + services: |
| 59 | + rabbitmq: |
| 60 | + image: pivotalrabbitmq/rabbitmq:master-otp-max |
| 61 | + ports: |
| 62 | + - 5672:5672 |
| 63 | + - 15672:15672 |
| 64 | + |
| 65 | + steps: |
| 66 | + - name: Clone repository |
| 67 | + uses: actions/checkout@v2 |
| 68 | + with: |
| 69 | + submodules: true |
| 70 | + - name: Setup .NET |
| 71 | + uses: actions/setup-dotnet@v1 |
| 72 | + with: |
| 73 | + dotnet-version: 3.1.x |
| 74 | + - name: Cache NuGet packages |
| 75 | + uses: actions/cache@v2 |
| 76 | + with: |
| 77 | + path: | |
| 78 | + ~/.nuget/packages |
| 79 | + ~/.local/share/NuGet/v3-cache |
| 80 | + key: ${{ runner.os }}-v0-nuget-${{ hashFiles('**/*.csproj') }} |
| 81 | + restore-keys: | |
| 82 | + ${{ runner.os }}-v0-nuget- |
| 83 | + - name: Restore |
| 84 | + run: dotnet restore --verbosity=normal |
| 85 | + - name: ApiGen |
| 86 | + run: dotnet run --project ./projects/Apigen/Apigen.csproj --apiName:AMQP_0_9_1 ./projects/specs/amqp0-9-1.stripped.xml ./gensrc/autogenerated-api-0-9-1.cs |
| 87 | + - name: Build |
| 88 | + run: dotnet build --no-restore --verbosity=normal |
| 89 | + - name: Test |
| 90 | + run: dotnet test --no-restore --no-build --logger "console;verbosity=detailed" --framework "netcoreapp3.1" |
| 91 | + env: |
| 92 | + RABBITMQ_RABBITMQCTL_PATH: DOCKER:${{job.services.rabbitmq.id}} |
0 commit comments