feat(moonzero): real RESP-over-TCP redis socket client with a live-re… #21
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: Check and Test | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: install-unix | |
| if: ${{ matrix.os != 'windows-latest' }} | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: install-windows | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: | | |
| Set-ExecutionPolicy RemoteSigned -Scope CurrentUser; irm https://cli.moonbitlang.com/install/powershell.ps1 | iex | |
| "C:\Users\runneradmin\.moon\bin" | Out-File -FilePath $env:GITHUB_PATH -Append | |
| - name: post install | |
| run: | | |
| moon version --all | |
| moon update | |
| - name: moon check | |
| run: moon check --target all --deny-warn | |
| - name: moon build | |
| run: moon build --target all | |
| - name: moon test (all backends) | |
| run: moon test --target all | |
| - name: lint (fmt is clean) | |
| run: | | |
| moon fmt && git diff --exit-code | |
| # The discovery drivers' real round trips run against live backends. redis speaks | |
| # RESP over a socket; the native discov tests register, resolve, keep-alive, and | |
| # deregister against it, gated on MOON_REDIS_TEST so the normal suite skips them. | |
| discovery: | |
| name: discovery drivers (native, live redis) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| services: | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: install | |
| run: | | |
| curl -fsSL https://cli.moonbitlang.com/install/unix.sh | bash | |
| echo "$HOME/.moon/bin" >> $GITHUB_PATH | |
| - name: post install | |
| run: | | |
| moon version --all | |
| moon update | |
| - name: discovery round trip against live redis | |
| env: | |
| MOON_REDIS_TEST: "1" | |
| MOON_REDIS_HOST: "127.0.0.1" | |
| run: moon test --target native |