Update certificates (limit to 365 days) #520
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 | |
| pull_request: | |
| branches: | |
| - main | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-ci | |
| cancel-in-progress: true | |
| jobs: | |
| macos: | |
| runs-on: macOS-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - 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: Convert coverage files | |
| run: | | |
| xcrun llvm-cov export -format "lcov" \ | |
| .build/debug/mqtt-nioPackageTests.xctest/Contents/MacOs/mqtt-nioPackageTests \ | |
| -ignore-filename-regex="\/Tests\/" \ | |
| -instr-profile=.build/debug/codecov/default.profdata > info.lcov | |
| - name: Upload to codecov.io | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: info.lcov | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| ios: | |
| runs-on: macOS-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Xcodebuild | |
| run: | | |
| xcodebuild build -scheme mqtt-nio -destination 'platform=iOS Simulator,name=iPhone 16' | |
| linux: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| matrix: | |
| tag: | |
| - swift:5.10 | |
| - swift:6.0 | |
| - swift:6.1 | |
| container: | |
| image: ${{ matrix.tag }} | |
| services: | |
| mosquitto: | |
| image: eclipse-mosquitto | |
| 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: Checkout | |
| uses: actions/checkout@v5 | |
| - 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-test-discovery --enable-code-coverage | |
| - name: Convert coverage files | |
| run: | | |
| llvm-cov export -format="lcov" \ | |
| .build/debug/mqtt-nioPackageTests.xctest \ | |
| -ignore-filename-regex="\/Tests\/" \ | |
| -instr-profile .build/debug/codecov/default.profdata > info.lcov | |
| - name: Upload to codecov.io | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: info.lcov | |
| token: ${{ secrets.CODECOV_TOKEN }} |