Allow protobuf v6, drop Protobuf v3/v4, min SDK 3.7 (#104) #333
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 | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| # Prevent duplicate builds on internal PRs. | |
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # Test compatible SDK and protobuf version combinations | |
| # protobuf 5.0.0+: SDK >= 3.7 | |
| include: | |
| # Test with oldest SDK supported. | |
| - sdk: "3.7" | |
| protobuf: "5.0.0" | |
| - sdk: "3.7" | |
| protobuf: "6.0.0" | |
| # Test latest protobuf versions with SDK stable and beta | |
| - sdk: stable | |
| protobuf: "5.0.0" | |
| - sdk: stable | |
| protobuf: "6.0.0" | |
| - sdk: beta | |
| protobuf: "5.0.0" | |
| - sdk: beta | |
| protobuf: "6.0.0" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dart-lang/setup-dart@v1 | |
| with: | |
| sdk: ${{ matrix.sdk }} | |
| - name: Install dependencies | |
| run: dart pub get | |
| - name: Override protobuf version | |
| run: dart pub add protobuf:${{ matrix.protobuf }} | |
| - name: Install coveralls | |
| run: sudo gem install coveralls-lcov | |
| - name: Start Centrifugo | |
| run: docker run -d -p 8000:8000 -e CENTRIFUGO_CHANNEL_WITHOUT_NAMESPACE_DELTA_PUBLISH=true -e CENTRIFUGO_CHANNEL_WITHOUT_NAMESPACE_ALLOWED_DELTA_TYPES="fossil" -e CENTRIFUGO_CHANNEL_WITHOUT_NAMESPACE_HISTORY_SIZE="100" -e CENTRIFUGO_CHANNEL_WITHOUT_NAMESPACE_HISTORY_TTL="300s" -e CENTRIFUGO_CHANNEL_WITHOUT_NAMESPACE_FORCE_RECOVERY="true" centrifugo/centrifugo:v6 centrifugo --client.insecure | |
| - name: Run tests | |
| run: bash tool/test.sh |