Add MQTTSession.subscribe
#660
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - v3 | |
| pull_request: | |
| branches: | |
| - main | |
| - v3 | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-ci | |
| cancel-in-progress: true | |
| jobs: | |
| macos-unit: | |
| name: macOS Unit Tests | |
| strategy: | |
| matrix: | |
| macos-version: | |
| - macos-15 | |
| - macos-26 | |
| runs-on: ${{ matrix.macos-version }} | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Select appropriate Xcode version | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install and run Mosquitto | |
| run: | | |
| brew install mosquitto | |
| mosquitto -d -c mosquitto/config/mosquitto.conf | |
| - name: SPM tests | |
| run: swift test --enable-code-coverage | |
| - name: Upload coverage data | |
| uses: vapor/[email protected] | |
| with: | |
| codecov_token: ${{ secrets.CODECOV_TOKEN }} | |
| ios-build: | |
| name: iOS Build | |
| runs-on: macos-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Select appropriate Xcode version | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Xcodebuild | |
| run: | | |
| xcodebuild build -scheme mqtt-nio -destination 'platform=iOS Simulator,name=iPhone 17' | |
| linux-unit: | |
| name: Linux Unit Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| tag: | |
| - swift:6.2 | |
| - swift:6.3 | |
| container: | |
| image: ${{ matrix.tag }} | |
| services: | |
| mosquitto: | |
| # Use mosquitto 2.0.22 because we can't get 2.1.0 to work inside a GH action | |
| image: eclipse-mosquitto:2.0.22 | |
| options: --name mosquitto | |
| ports: | |
| - 1883:1883 | |
| - 1884:1884 | |
| - 8883:8883 | |
| - 8080:8080 | |
| - 8081:8081 | |
| volumes: | |
| - ${{ github.workspace }}/mosquitto/config:/mosquitto/config | |
| - ${{ github.workspace }}/mosquitto/certs:/mosquitto/certs | |
| - ${{ github.workspace }}/mosquitto/socket:/mosquitto/socket | |
| steps: | |
| - name: Install curl | |
| run: apt-get update -yq && apt-get install -y curl | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Restart Mosquitto | |
| # The mosquitto service container is started *before* mqtt-nio is checked | |
| # out. Restarting the container after the checkout step is needed for the | |
| # container to see volumes populated from the checked out workspace. | |
| uses: docker://docker | |
| with: | |
| args: docker restart mosquitto | |
| - name: Test | |
| env: | |
| MOSQUITTO_SERVER: mosquitto | |
| run: | | |
| swift test --enable-code-coverage | |
| - name: Upload coverage data | |
| uses: vapor/[email protected] | |
| with: | |
| codecov_token: ${{ secrets.CODECOV_TOKEN }} | |
| android-build: | |
| name: Android Build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: "Checkout" | |
| uses: actions/checkout@v6 | |
| - name: "Build for Android" | |
| uses: skiptools/swift-android-action@v2 | |
| with: | |
| build-tests: true | |
| run-tests: false |