|
| 1 | +name: CI |
| 2 | + |
| 3 | +# NOTE: keep UV_VERSION in sync with uv-version in s2-lite-integration-tests sdks JSON below. |
| 4 | +env: |
| 5 | + UV_VERSION: "0.11.3" |
| 6 | + |
| 7 | +on: |
| 8 | + pull_request: |
| 9 | + types: |
| 10 | + [ |
| 11 | + opened, |
| 12 | + synchronize, |
| 13 | + ready_for_review, |
| 14 | + reopened, |
| 15 | + ] |
| 16 | +jobs: |
| 17 | + local-checks: |
| 18 | + name: Local Checks (code quality, unit tests, docs build) |
| 19 | + runs-on: ubuntu-latest |
| 20 | + steps: |
| 21 | + - name: Checkout repository |
| 22 | + uses: actions/checkout@v4 |
| 23 | + - name: Install uv |
| 24 | + uses: astral-sh/setup-uv@v7 |
| 25 | + with: |
| 26 | + version: ${{ env.UV_VERSION }} |
| 27 | + - name: Sync dependencies |
| 28 | + run: | |
| 29 | + uv sync --all-groups |
| 30 | + - name: Static code check |
| 31 | + run: uv run poe ci_checker |
| 32 | + - name: Unit tests |
| 33 | + run: uv run pytest tests/ -v -m 'not (account or basin or stream or metrics)' |
| 34 | + - name: Check docs build |
| 35 | + working-directory: ./docs |
| 36 | + run: | |
| 37 | + make html |
| 38 | + s2-cloud-integration-tests: |
| 39 | + name: s2-cloud integration tests |
| 40 | + runs-on: ubuntu-latest |
| 41 | + steps: |
| 42 | + - name: Checkout repository |
| 43 | + uses: actions/checkout@v4 |
| 44 | + - name: Install uv |
| 45 | + uses: astral-sh/setup-uv@v7 |
| 46 | + with: |
| 47 | + version: ${{ env.UV_VERSION }} |
| 48 | + - name: Sync dependencies |
| 49 | + run: uv sync --group test |
| 50 | + - name: Run integration tests |
| 51 | + env: |
| 52 | + S2_ACCESS_TOKEN: ${{ secrets.S2_ACCESS_TOKEN }} |
| 53 | + run: uv run pytest tests/ -v -s -m 'account or basin or stream or metrics' |
| 54 | + |
| 55 | + build-s2-lite: |
| 56 | + name: Build s2-lite |
| 57 | + uses: s2-streamstore/s2/.github/workflows/build-s2-lite.yml@main |
| 58 | + |
| 59 | + s2-lite-integration-tests: |
| 60 | + name: s2-lite integration tests |
| 61 | + needs: build-s2-lite |
| 62 | + uses: s2-streamstore/s2/.github/workflows/sdk-tests.yml@main |
| 63 | + with: |
| 64 | + server-binary: server |
| 65 | + server-args: "--port 8080" |
| 66 | + server-port: 8080 |
| 67 | + sdks: | |
| 68 | + [ |
| 69 | + { |
| 70 | + "name": "python", |
| 71 | + "repo": "${{ github.repository }}", |
| 72 | + "ref": "${{ github.ref }}", |
| 73 | + "lang": "python", |
| 74 | + "uv-version": "0.11.3", |
| 75 | + "test_cmd": "uv run pytest tests/ -v -s -m '(account or basin or stream) and not cloud_only'" |
| 76 | + } |
| 77 | + ] |
0 commit comments