feat(deploy): split cluster changes into keyspace and access changes #246
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: Tests | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| couchbase-server-version: | |
| description: 'Couchbase Server version to test against' | |
| type: choice | |
| required: false | |
| default: 'all' | |
| options: | |
| - 'all' | |
| - 'enterprise-7.2.4' | |
| - 'enterprise-7.6.4' | |
| - 'enterprise-8.0.0' | |
| push: | |
| branches: | |
| - main | |
| issue_comment: | |
| types: [created] | |
| jobs: | |
| test: | |
| if: > | |
| (github.event_name == 'push' | |
| && !contains(github.event.head_commit.message, 'skip ci') | |
| && !startsWith(github.event.head_commit.message, 'docs')) || | |
| (github.event.issue.pull_request && startsWith(github.event.comment.body, '/test') && github.actor == 'JesusTheHun') || | |
| github.event_name == 'workflow_dispatch' | |
| timeout-minutes: 30 | |
| runs-on: | |
| labels: blacksmith-4vcpu-ubuntu-2404 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| couchbase-server-version: ${{ github.event_name == 'workflow_dispatch' && inputs.couchbase-server-version != 'all' && fromJSON(format('["{0}"]', inputs.couchbase-server-version)) || fromJSON('["enterprise-7.2.4","enterprise-7.6.4","enterprise-8.0.0"]') }} | |
| services: | |
| couchbase: | |
| image: couchbase:${{ matrix.couchbase-server-version }} | |
| ports: | |
| - 8091:8091 | |
| - 8092:8092 | |
| - 8093:8093 | |
| - 8094:8094 | |
| - 8095:8095 | |
| - 8096:8096 | |
| - 8097:8097 | |
| - 9102:9102 | |
| - 18091:18091 | |
| - 18092:18092 | |
| - 18093:18093 | |
| - 18094:18094 | |
| - 18095:18095 | |
| - 18096:18096 | |
| - 18097:18097 | |
| - 19102:19102 | |
| - 9123:9123 | |
| - 11210:11210 | |
| - 11280:11280 | |
| env: | |
| CB_CONNECTION_STRING: couchbase://127.0.0.1 | |
| CB_USER: Administrator | |
| CB_PASSWORD: password | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'pnpm' | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install dependencies | |
| run: pnpm i | |
| - name: Build packages | |
| run: pnpm run build | |
| - name: Initialize Couchbase cluster | |
| run: pnpm dlx tsx tests/scripts/initTestCluster.ts | |
| - name: Restore vitest cache | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ./node_modules/.vite/results.json | |
| key: vitest-cache-${{ matrix.couchbase-server-version }}-${{ github.ref_name }}-${{ github.run_id }}-${{ github.run_attempt }} | |
| restore-keys: | | |
| vitest-cache-${{ matrix.couchbase-server-version }}-${{ github.ref_name }}- | |
| vitest-cache-${{ matrix.couchbase-server-version }}-main- | |
| - name: Run all tests | |
| run: pnpm vitest --run --bail 5 | |
| - name: Save vitest cache | |
| if: always() | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ./node_modules/.vite/results.json | |
| key: vitest-cache-${{ matrix.couchbase-server-version }}-${{ github.ref_name }}-${{ github.run_id }}-${{ github.run_attempt }} | |
| - name: Upload Tests Report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tests-report-${{ matrix.couchbase-server-version }}-${{ github.sha }} | |
| path: tests-report | |
| overwrite: true | |
| - name: Upload Tests Logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tests-logs-${{ matrix.couchbase-server-version }}-${{ github.sha }} | |
| path: vitest-pino.log | |
| overwrite: true |