Running stage workflow #8
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: 'Comprehensive tests' | ||
| run-name: 'Comprehensive tests (nodejs-tags=${{ inputs.nodejs-tags }}, platform-tag=${{ inputs.platform-tag }}, run_tests=${{ inputs.run_tests }}, use-server-rc=${{ inputs.use-server-rc }}, server-tag=${{ inputs.server-tag }})' | ||
| permissions: | ||
| # This is required for requesting the OIDC token | ||
| id-token: write | ||
| contents: read | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| nodejs-tags: | ||
| type: string | ||
| required: false | ||
| default: '[["v115", "20"], ["v127", "22"], ["v137", "24"]]' | ||
| platform-tag: | ||
| type: string | ||
| required: true | ||
| version: | ||
| type: string | ||
| description: Build version | ||
| required: true | ||
| run_tests: | ||
| type: boolean | ||
| required: false | ||
| default: true | ||
| server-tag: | ||
| required: false | ||
| type: string | ||
| default: '8.1.0.0' | ||
| description: 'Server docker image tag' | ||
| secrets: | ||
| soup_hat: | ||
| required: true | ||
| cell_girl: | ||
| required: true | ||
| song_loss: | ||
| required: true | ||
| king_health: | ||
| required: true | ||
| jobs: | ||
| get-runner-os: | ||
| outputs: | ||
| runner-os: ${{ steps.get-runner-os.outputs.runner_os }} | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - id: get-runner-os | ||
| run: | | ||
| declare -A hashmap | ||
| hashmap[manylinux_x86_64]="ubuntu-22.04" | ||
| hashmap[manylinux_aarch64]="ubuntu-22.04-arm" | ||
| hashmap[macosx_x86_64]="macos-13-large" | ||
| hashmap[macosx_arm64]="SMA2" | ||
| hashmap[win_amd64]="windows-2022" | ||
| echo runner_os=${hashmap[${{ inputs.platform-tag }}]} >> $GITHUB_OUTPUT | ||
| shell: bash | ||
| test-ee: | ||
| needs: get-runner-os | ||
| if: ${{ inputs.run_tests && (inputs.platform-tag != 'win_amd64') }} | ||
| strategy: | ||
| matrix: | ||
| nodejs-tag: ${{ fromJSON(inputs.nodejs-tags) }} | ||
| fail-fast: false | ||
| runs-on: ${{ needs.get-runner-os.outputs.runner-os }} | ||
| env: | ||
| BUILD_IDENTIFIER: "${{ matrix.nodejs-tag[0] }}-${{ inputs.platform-tag }}" | ||
| steps: | ||
| - name: Create status check message | ||
| run: echo STATUS_CHECK_MESSAGE="test-ee (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV | ||
| shell: bash | ||
| - name: Show job status for commit | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| submodules: recursive | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| with: | ||
| node-version: ${{ matrix.nodejs-tag[1] }} | ||
| - name: Windows: Install C client deps | ||
| if: ${{ inputs.platform-tag == 'win_amd64' }} | ||
| run: nuget restore | ||
| working-directory: aerospike-client-c/vs | ||
| - name: 'macOS x86: Setup Docker using colima for testing' | ||
| if: ${{ inputs.platform-tag == 'macosx_x86_64' }} | ||
| uses: ./.github/actions/setup-docker-on-macos | ||
| - name: 'macOS x86: run Aerospike server in Docker container and connect via localhost' | ||
| if: ${{ inputs.platform-tag == 'macosx_x86_64' }} | ||
| uses: ./.github/actions/run-ee-server-for-ext-container | ||
| with: | ||
| use-server-rc: ${{ inputs.use-server-rc }} | ||
| server-tag: ${{ inputs.server-tag }} | ||
| docker-hub-username: ${{ secrets.soup_hat }} | ||
| docker-hub-password: ${{ secrets.cell_girl }} | ||
| - name: Remove aerospike docker image | ||
| if: ${{ inputs.platform-tag == 'manylinux_aarch64' }} | ||
| run: | | ||
| if docker ps -aq | grep -q .; then | ||
| docker rm -f $(docker ps -aq) || echo "Failed to remove one or more containers." | ||
| else | ||
| echo "No containers to remove." | ||
| fi | ||
| # TODO: combine this composite action and the above into one | ||
| - name: "Linux: run Aerospike server in Docker container and configure config.conf to connect to the server container's Docker IP address" | ||
| if: ${{ inputs.platform-tag == 'manylinux_x86_64' || inputs.platform-tag == 'manylinux_aarch64' }} | ||
| uses: ./.github/actions/run-ee-server-for-ext-container | ||
| with: | ||
| use-server-rc: ${{ inputs.use-server-rc }} | ||
| server-tag: ${{ inputs.server-tag }} | ||
| docker-hub-username: ${{ secrets.soup_hat }} | ||
| docker-hub-password: ${{ secrets.cell_girl }} | ||
| # FIND NO SERVER TESTS AND RUN THEM | ||
| # | ||
| #- name: If not running tests against server, only run basic import test | ||
| # if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'false' }} | ||
| # # Use double quotes otherwise Windows will throw this error in cibuildwheel | ||
| # # 'import | ||
| # # ^ | ||
| # # SyntaxError: EOL while scanning string literal | ||
| # run: echo "TEST_COMMAND=python -c \"import aerospike\"" >> $GITHUB_ENV | ||
| # shell: bash | ||
| #- name: Otherwise, enable integration tests | ||
| # if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'true' }} | ||
| # run: echo "TEST_COMMAND=cd ts-test; | ||
| # npm install typescript --ignore-scripts --save-dev --save-dev; | ||
| # npx tsc; | ||
| # cd ..; | ||
| # npm run test dist/ -- --h 127.0.0.1 --port 3000" >> $GITHUB_ENV | ||
| # shell: bash | ||
| - name: Set up JFrog credentials | ||
| uses: jfrog/setup-jfrog-cli@88e9eba31c07e31beefa4cef5c0e93d1af9535d7 # v4.6.1 | ||
| env: | ||
| JF_URL: ${{ secrets.king_health }} | ||
| with: | ||
| oidc-provider-name: gh-aerospike-clients | ||
| oidc-audience: aerospike/clients | ||
| - name: Download Artifacts from Jfrog | ||
| run: jf rt dl "clients-npm-dev-local/aerospike/${{ env.NEW_VERSION }}/" "downloaded-artifacts/" | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| PACKAGE_MANAGER: npm | ||
| - name: list Artifacts | ||
| run: | | ||
| ls downloaded-artifacts | ||
| ls downloaded-artifacts/aerospike | ||
| ls downloaded-artifacts/aerospike/${{ env.NEW_VERSION }} | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| - name: Move artifacts | ||
| run: | | ||
| tar --strip-components=1 -xvf aerospike-${{ env.NEW_VERSION }}.tgz | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: check binding | ||
| run: | ||
| ls lib/binding; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Change install command for release | ||
| run: node ./scripts/change-install-command.js | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Run tests | ||
| if: ${{ inputs.run_tests && startsWith(inputs.platform-tag, 'manylinux')}} | ||
| run: | | ||
| docker ps; | ||
| docker logs aerospike; | ||
| cd ts-test; | ||
| npm ci; | ||
| npx tsc; | ||
| cd ..; | ||
| rm -rf ts-test/dist; | ||
| npx tsc; | ||
| npm run test -- --t 40000 --h 127.0.0.1 --port 3000 --U superuser --P superuser; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Run tests | ||
| if: ${{ inputs.run_tests && inputs.platform-tag == 'macosx_x86_64'}} | ||
| run: | | ||
| docker ps; | ||
| docker logs aerospike; | ||
| cd ts-test; | ||
| npm ci; | ||
| npx tsc; | ||
| cd ..; | ||
| npx tsc; | ||
| npm run test -- --t 40000 --h 127.0.0.1 --port 3000 --U superuser --P superuser; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| #- name: Debug server | ||
| # run: | | ||
| # docker ps; | ||
| # docker logs aerospike; | ||
| - name: Set final commit status | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| status: ${{ job.status }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| # test-prefer-rack: | ||
| # needs: get-runner-os | ||
| # if: ${{ inputs.run_tests && (inputs.platform-tag == 'manylinux_x86_64') }} | ||
| # strategy: | ||
| # matrix: | ||
| # nodejs-tag: ${{ fromJSON(inputs.nodejs-tags) }} | ||
| # fail-fast: false | ||
| # runs-on: ${{ needs.get-runner-os.outputs.runner-os }} | ||
| # env: | ||
| # BUILD_IDENTIFIER: "${{ matrix.nodejs-tag[0] }}-${{ inputs.platform-tag }}" | ||
| # steps: | ||
| # | ||
| # # REUSABLE PART | ||
| # - name: Create status check message | ||
| # run: echo STATUS_CHECK_MESSAGE="test-ee (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV | ||
| # shell: bash | ||
| # | ||
| # - name: Show job status for commit | ||
| # uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| # if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| # with: | ||
| # sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| # context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| # | ||
| # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| # with: | ||
| # submodules: recursive | ||
| # # We need the last tag before the ref, so we can relabel the version if needed | ||
| # fetch-depth: 0 | ||
| # | ||
| # - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| # with: | ||
| # node-version: ${{ matrix.nodejs-tag[1] }} | ||
| # | ||
| # - name: Download Aerolab zip | ||
| # run: | | ||
| # curl -L -o aerolab.zip https://github.com/aerospike/aerolab/releases/download/7.8.0/aerolab-linux-amd64-7.8.0.zip | ||
| # | ||
| # - name: Unzip Aerolab binary | ||
| # run: | | ||
| # unzip aerolab.zip | ||
| # chmod +x aerolab | ||
| # | ||
| # - name: Move binary to /usr/local/bin | ||
| # run: sudo mv aerolab /usr/local/bin/ | ||
| # | ||
| # - name: Verify installation | ||
| # run: aerolab version | ||
| # | ||
| # - name: Configure Aerolab backend | ||
| # run: aerolab config backend -t docker | ||
| # | ||
| # | ||
| # - name: Retrieve the secret and decode it to a file | ||
| # env: | ||
| # tale_breath: ${{ secrets.tale_breath }} | ||
| # run: | | ||
| # echo $tale_breath | base64 --decode > features.conf | ||
| # working-directory: ts-test | ||
| # | ||
| # - name: Create cluster | ||
| # run: sh scripts/three_node.sh | ||
| # working-directory: ts-test | ||
| # | ||
| # - name: list cluster | ||
| # run: aerolab cluster list | ||
| # | ||
| # - name: Set up JFrog credentials | ||
| # uses: jfrog/setup-jfrog-cli@88e9eba31c07e31beefa4cef5c0e93d1af9535d7 # v4.6.1 | ||
| # env: | ||
| # JF_URL: ${{ secrets.king_health }} | ||
| # with: | ||
| # oidc-provider-name: gh-aerospike-clients | ||
| # oidc-audience: aerospike/clients | ||
| # | ||
| # - name: Download Artifacts from Jfrog | ||
| # run: jf rt dl "clients-npm-dev-local/aerospike/${{ env.NEW_VERSION }}/" "downloaded-artifacts/" | ||
| # env: | ||
| # NEW_VERSION: ${{ inputs.version }} | ||
| # PACKAGE_MANAGER: npm | ||
| # | ||
| # - name: list Artifacts | ||
| # run: | | ||
| # ls downloaded-artifacts | ||
| # ls downloaded-artifacts/aerospike | ||
| # ls downloaded-artifacts/aerospike/${{ env.NEW_VERSION }} | ||
| # env: | ||
| # NEW_VERSION: ${{ inputs.version }} | ||
| # | ||
| # - name: Move artifacts | ||
| # run: | | ||
| # tar --strip-components=1 -xvf aerospike-${{ env.NEW_VERSION }}.tgz | ||
| # env: | ||
| # NEW_VERSION: ${{ inputs.version }} | ||
| # working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| # | ||
| # - name: check binding | ||
| # run: | ||
| # ls lib/binding; | ||
| # working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| # | ||
| # - name: Change install command for release | ||
| # run: node ./scripts/change-install-command.js | ||
| # working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| # | ||
| # - name: add in debug string for test | ||
| # run: | | ||
| # awk 'NR==613{print "\t\tprintf(\"Node=%s\\n\", as_node_get_address_string(cmd->node));"}1' aerospike-client-c/src/main/aerospike/as_event.c > temp && mv temp aerospike-client-c/src/main/aerospike/as_event.c | ||
| # working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| # | ||
| # - name: Run tests | ||
| # if: ${{ inputs.run_tests && startsWith(inputs.platform-tag, 'manylinux')}} | ||
| # run: | | ||
| # docker ps; | ||
| # cd ts-test; | ||
| # npm ci; | ||
| # npx tsc; | ||
| # cd ..; | ||
| # npx tsc; | ||
| # npm run test --testfile=prefer_rack.js -- --testPreferRack true --h 0.0.0.0 --port 3100 --t 40000; | ||
| # npm run test --testfile=metrics_key_busy.js -- --testMetricsKeyBusy true --h 0.0.0.0 --port 3100 --t 40000; | ||
| # working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| # | ||
| # - name: Destroy cluster 1 | ||
| # run: echo y | aerolab cluster destroy | ||
| # | ||
| # - name: Set final commit status | ||
| # uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| # if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| # with: | ||
| # sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| # status: ${{ job.status }} | ||
| # context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| test-set-xdr-filter: | ||
| needs: get-runner-os | ||
| if: ${{ inputs.run_tests && (inputs.platform-tag == 'manylinux_x86_64') }} | ||
| strategy: | ||
| matrix: | ||
| nodejs-tag: ${{ fromJSON(inputs.nodejs-tags) }} | ||
| fail-fast: false | ||
| runs-on: ${{ needs.get-runner-os.outputs.runner-os }} | ||
| env: | ||
| BUILD_IDENTIFIER: "${{ matrix.nodejs-tag[0] }}-${{ inputs.platform-tag }}" | ||
| steps: | ||
| # REUSABLE PART | ||
| - name: Create status check message | ||
| run: echo STATUS_CHECK_MESSAGE="test-ee (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV | ||
| shell: bash | ||
| - name: Show job status for commit | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| submodules: recursive | ||
| # We need the last tag before the ref, so we can relabel the version if needed | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| with: | ||
| node-version: ${{ matrix.nodejs-tag[1] }} | ||
| - name: Download Aerolab zip | ||
| run: | | ||
| curl -L -o aerolab.zip https://github.com/aerospike/aerolab/releases/download/7.8.0/aerolab-linux-amd64-7.8.0.zip | ||
| - name: Unzip Aerolab binary | ||
| run: | | ||
| unzip aerolab.zip | ||
| chmod +x aerolab | ||
| - name: Move binary to /usr/local/bin | ||
| run: sudo mv aerolab /usr/local/bin/ | ||
| - name: Verify installation | ||
| run: aerolab version | ||
| - name: Configure Aerolab backend | ||
| run: aerolab config backend -t docker | ||
| - name: Create cluster | ||
| run: aerolab xdr create-clusters -n dc1 -c 3 -N dc2 -C 3 -M test | ||
| - name: list cluster | ||
| run: aerolab cluster list | ||
| - name: Set up JFrog credentials | ||
| uses: jfrog/setup-jfrog-cli@88e9eba31c07e31beefa4cef5c0e93d1af9535d7 # v4.6.1 | ||
| env: | ||
| JF_URL: ${{ secrets.king_health }} | ||
| with: | ||
| oidc-provider-name: gh-aerospike-clients | ||
| oidc-audience: aerospike/clients | ||
| - name: Download Artifacts from Jfrog | ||
| run: jf rt dl "clients-npm-dev-local/aerospike/${{ env.NEW_VERSION }}/" "downloaded-artifacts/" | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| PACKAGE_MANAGER: npm | ||
| - name: list Artifacts | ||
| run: | | ||
| ls downloaded-artifacts | ||
| ls downloaded-artifacts/aerospike | ||
| ls downloaded-artifacts/aerospike/${{ env.NEW_VERSION }} | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| - name: Move artifacts | ||
| run: | | ||
| tar --strip-components=1 -xvf aerospike-${{ env.NEW_VERSION }}.tgz | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: check binding | ||
| run: | ||
| ls lib/binding; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Change install command for release | ||
| run: node ./scripts/change-install-command.js | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Run tests | ||
| if: ${{ inputs.run_tests && startsWith(inputs.platform-tag, 'manylinux') }} | ||
| run: | | ||
| docker ps; | ||
| cd ts-test; | ||
| npm ci; | ||
| npx tsc; | ||
| cd ..; | ||
| npx tsc; | ||
| npm run test --testfile=set_xdr_filter.js -- --testXDR true --h 172.17.0.2 --port 3100; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Destroy cluster 1 | ||
| run: echo y | aerolab cluster destroy --name dc1 | ||
| - name: Destroy cluster 2 | ||
| run: echo y | aerolab cluster destroy --name dc2 | ||
| - name: Set final commit status | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| status: ${{ job.status }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| test-valgrind: | ||
| needs: get-runner-os | ||
| strategy: | ||
| matrix: | ||
| nodejs-tag: ${{ fromJSON(inputs.nodejs-tags) }} | ||
| fail-fast: false | ||
| if: ${{ inputs.platform-tag == 'manylinux_x86_64' }} | ||
| runs-on: ${{ needs.get-runner-os.outputs.runner-os }} | ||
| env: | ||
| BUILD_IDENTIFIER: "${{ matrix.nodejs-tag[0] }}-${{ inputs.platform-tag }}" | ||
| steps: | ||
| # REUSABLE PART | ||
| - name: Create status check message | ||
| run: echo STATUS_CHECK_MESSAGE="test-ee (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV | ||
| shell: bash | ||
| - name: Show job status for commit | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| submodules: recursive | ||
| # We need the last tag before the ref, so we can relabel the version if needed | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| with: | ||
| node-version: ${{ matrix.nodejs-tag[1] }} | ||
| - name: 'Windows: Install C client deps' | ||
| if: ${{ inputs.platform-tag == 'win_amd64' }} | ||
| run: nuget restore | ||
| working-directory: aerospike-client-c/vs | ||
| - name: 'macOS x86: Setup Docker using colima for testing' | ||
| if: ${{ inputs.platform-tag == 'macosx_x86_64' }} | ||
| uses: ./.github/actions/setup-docker-on-macos | ||
| - name: 'macOS x86: run Aerospike server in Docker container and connect via localhost' | ||
| if: ${{ inputs.platform-tag == 'macosx_x86_64' }} | ||
| uses: ./.github/actions/run-ee-server-for-ext-container | ||
| with: | ||
| use-server-rc: ${{ inputs.use-server-rc }} | ||
| server-tag: ${{ inputs.server-tag }} | ||
| docker-hub-username: ${{ secrets.soup_hat }} | ||
| docker-hub-password: ${{ secrets.cell_girl }} | ||
| - name: Remove aerospike docker image | ||
| if: ${{ inputs.platform-tag == 'manylinux_aarch64' }} | ||
| run: | | ||
| if docker ps -aq | grep -q .; then | ||
| docker rm -f $(docker ps -aq) || echo "Failed to remove one or more containers." | ||
| else | ||
| echo "No containers to remove." | ||
| fi | ||
| # TODO: combine this composite action and the above into one | ||
| - name: "Linux: run Aerospike server in Docker container and configure config.conf to connect to the server container's Docker IP address" | ||
| if: ${{ inputs.platform-tag == 'manylinux_x86_64' || inputs.platform-tag == 'manylinux_aarch64' }} | ||
| uses: ./.github/actions/run-ee-server-for-ext-container | ||
| with: | ||
| use-server-rc: ${{ inputs.use-server-rc }} | ||
| server-tag: ${{ inputs.server-tag }} | ||
| docker-hub-username: ${{ secrets.soup_hat }} | ||
| docker-hub-password: ${{ secrets.cell_girl }} | ||
| # FIND NO SERVER TESTS AND RUN THEM | ||
| # | ||
| #- name: If not running tests against server, only run basic import test | ||
| # if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'false' }} | ||
| # # Use double quotes otherwise Windows will throw this error in cibuildwheel | ||
| # # 'import | ||
| # # ^ | ||
| # # SyntaxError: EOL while scanning string literal | ||
| # run: echo "TEST_COMMAND=python -c \"import aerospike\"" >> $GITHUB_ENV | ||
| # shell: bash | ||
| #- name: Otherwise, enable integration tests | ||
| # if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'true' }} | ||
| # run: echo "TEST_COMMAND=cd ts-test; | ||
| # npm install typescript --ignore-scripts --save-dev --save-dev; | ||
| # npx tsc; | ||
| # cd ..; | ||
| # npm run test dist/ -- --h 127.0.0.1 --port 3000" >> $GITHUB_ENV | ||
| # shell: bash | ||
| - name: Set up JFrog credentials | ||
| uses: jfrog/setup-jfrog-cli@88e9eba31c07e31beefa4cef5c0e93d1af9535d7 # v4.6.1 | ||
| env: | ||
| JF_URL: ${{ secrets.king_health }} | ||
| with: | ||
| oidc-provider-name: gh-aerospike-clients | ||
| oidc-audience: aerospike/clients | ||
| - name: Download Artifacts from Jfrog | ||
| run: jf rt dl "clients-npm-dev-local/aerospike/${{ env.NEW_VERSION }}/" "downloaded-artifacts/" | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| PACKAGE_MANAGER: npm | ||
| - name: list Artifacts | ||
| run: | | ||
| ls downloaded-artifacts | ||
| ls downloaded-artifacts/aerospike | ||
| ls downloaded-artifacts/aerospike/${{ env.NEW_VERSION }} | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| - name: Move artifacts | ||
| run: | | ||
| tar --strip-components=1 -xvf aerospike-${{ env.NEW_VERSION }}.tgz | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: check binding | ||
| run: | ||
| ls lib/binding; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Change install command for release | ||
| run: node ./scripts/change-install-command.js | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: install valgrind | ||
| run: | | ||
| sudo apt-get update; | ||
| sudo apt update; | ||
| sudo apt install valgrind; | ||
| - name: Install pre-reqs | ||
| if: ${{ inputs.run_tests && startsWith(inputs.platform-tag, 'manylinux') }} | ||
| run: | | ||
| cd ts-test; | ||
| npm ci; | ||
| npx tsc; | ||
| cp tests/udf.lua dist/udf.lua; | ||
| cd ..; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Run Valgrind | ||
| run: | | ||
| docker ps; | ||
| npx tsc; | ||
| npm run valgrind -- --t 40000 --h 127.0.0.1 --port 3000 --U superuser --P superuser; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Set final commit status | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| status: ${{ job.status }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| test-tsc-compile: | ||
| needs: get-runner-os | ||
| if: ${{ inputs.run_tests && (inputs.platform-tag != 'win_amd64') }} | ||
| strategy: | ||
| matrix: | ||
| nodejs-tag: ${{ fromJSON(inputs.nodejs-tags) }} | ||
| fail-fast: false | ||
| runs-on: ${{ needs.get-runner-os.outputs.runner-os }} | ||
| env: | ||
| BUILD_IDENTIFIER: "${{ matrix.nodejs-tag[0] }}-${{ inputs.platform-tag }}" | ||
| steps: | ||
| # REUSABLE PART | ||
| - name: Create status check message | ||
| run: echo STATUS_CHECK_MESSAGE="test-ee (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV | ||
| shell: bash | ||
| - name: Show job status for commit | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| submodules: recursive | ||
| # We need the last tag before the ref, so we can relabel the version if needed | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| with: | ||
| node-version: ${{ matrix.nodejs-tag[1] }} | ||
| # FIND NO SERVER TESTS AND RUN THEM | ||
| # | ||
| #- name: If not running tests against server, only run basic import test | ||
| # if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'false' }} | ||
| # # Use double quotes otherwise Windows will throw this error in cibuildwheel | ||
| # # 'import | ||
| # # ^ | ||
| # # SyntaxError: EOL while scanning string literal | ||
| # run: echo "TEST_COMMAND=python -c \"import aerospike\"" >> $GITHUB_ENV | ||
| # shell: bash | ||
| #- name: Otherwise, enable integration tests | ||
| # if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'true' }} | ||
| # run: echo "TEST_COMMAND=cd ts-test; | ||
| # npm install typescript --ignore-scripts --save-dev --save-dev; | ||
| # npx tsc; | ||
| # cd ..; | ||
| # npm run test dist/ -- --h 127.0.0.1 --port 3000" >> $GITHUB_ENV | ||
| # shell: bash | ||
| - name: Set up JFrog credentials | ||
| uses: jfrog/setup-jfrog-cli@88e9eba31c07e31beefa4cef5c0e93d1af9535d7 # v4.6.1 | ||
| env: | ||
| JF_URL: ${{ secrets.king_health }} | ||
| with: | ||
| oidc-provider-name: gh-aerospike-clients | ||
| oidc-audience: aerospike/clients | ||
| - name: Download Artifacts from Jfrog | ||
| run: jf rt dl "clients-npm-dev-local/aerospike/${{ env.NEW_VERSION }}/" "downloaded-artifacts/" | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| PACKAGE_MANAGER: npm | ||
| - name: list Artifacts | ||
| run: | | ||
| ls downloaded-artifacts | ||
| ls downloaded-artifacts/aerospike | ||
| ls downloaded-artifacts/aerospike/${{ env.NEW_VERSION }} | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| - name: Move artifacts | ||
| run: | | ||
| tar --strip-components=1 -xvf aerospike-${{ env.NEW_VERSION }}.tgz | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: check binding | ||
| run: | ||
| ls lib/binding; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Change install command for release | ||
| run: node ./scripts/change-install-command.js | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Run tests | ||
| if: ${{ inputs.run_tests && startsWith(inputs.platform-tag, 'manylinux') }} | ||
| run: | | ||
| cd ts-test; | ||
| npm ci; | ||
| npx tsc; | ||
| cd ..; | ||
| npx tsc; | ||
| npx tsc typings/index.d.ts; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Run tests | ||
| if: ${{ inputs.run_tests && inputs.platform-tag == 'macosx_x86_64'}} | ||
| run: | | ||
| cd ts-test; | ||
| npm ci; | ||
| npx tsc; | ||
| cd ..; | ||
| npx tsc; | ||
| npx tsc typings/index.d.ts; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Set final commit status | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| status: ${{ job.status }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| test-metrics: | ||
| needs: get-runner-os | ||
| strategy: | ||
| matrix: | ||
| nodejs-tag: ${{ fromJSON(inputs.nodejs-tags) }} | ||
| fail-fast: false | ||
| runs-on: ${{ needs.get-runner-os.outputs.runner-os }} | ||
| if: ${{ inputs.run_tests && ( inputs.platform-tag != 'macosx_x86_64' ) }} | ||
| env: | ||
| BUILD_IDENTIFIER: "${{ matrix.nodejs-tag[0] }}-${{ inputs.platform-tag }}" | ||
| steps: | ||
| # REUSABLE PART | ||
| - name: Create status check message | ||
| run: echo STATUS_CHECK_MESSAGE="test-ee (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV | ||
| shell: bash | ||
| - name: Show job status for commit | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| submodules: recursive | ||
| # We need the last tag before the ref, so we can relabel the version if needed | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| with: | ||
| node-version: ${{ matrix.nodejs-tag[1] }} | ||
| - name: Set up JFrog credentials | ||
| uses: jfrog/setup-jfrog-cli@88e9eba31c07e31beefa4cef5c0e93d1af9535d7 # v4.6.1 | ||
| env: | ||
| JF_URL: ${{ secrets.king_health }} | ||
| with: | ||
| oidc-provider-name: gh-aerospike-clients | ||
| oidc-audience: aerospike/clients | ||
| - name: Download Artifacts from Jfrog | ||
| run: jf rt dl "clients-npm-dev-local/aerospike/${{ env.NEW_VERSION }}/" "downloaded-artifacts/" | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| PACKAGE_MANAGER: npm | ||
| - name: list Artifacts | ||
| run: | | ||
| ls downloaded-artifacts | ||
| ls downloaded-artifacts/aerospike | ||
| ls downloaded-artifacts/aerospike/${{ env.NEW_VERSION }} | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| - name: Move artifacts | ||
| run: | | ||
| tar --strip-components=1 -xvf aerospike-${{ env.NEW_VERSION }}.tgz | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: check binding | ||
| run: | ||
| ls lib/binding; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Change install command for release | ||
| run: node ./scripts/change-install-command.js | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: 'macOS x86: Setup Docker using colima for testing' | ||
| if: ${{ inputs.platform-tag == 'macosx_x86_64' }} | ||
| uses: ./.github/actions/setup-docker-on-macos | ||
| - name: Run tests | ||
| if: ${{ inputs.run_tests && startsWith(inputs.platform-tag, 'manylinux') }} | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| run: | | ||
| docker ps; | ||
| cd ts-test; | ||
| npm ci; | ||
| npx tsc; | ||
| cd ..; | ||
| npx tsc; | ||
| docker pull aerospike/aerospike-server:latest; | ||
| npm run test --testfile=metrics_node_close.js -- --testMetrics true --h localhost --port 3000 --t 50000; | ||
| npm run test --testfile=metrics_cluster_name.js -- --testMetrics true --h localhost --port 3000 --t 50000; | ||
| - name: Run tests | ||
| if: ${{ inputs.run_tests && inputs.platform-tag == 'macosx_x86_64'}} | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| run: | | ||
| docker ps; | ||
| cd ts-test; | ||
| npm ci; | ||
| npx tsc; | ||
| cd ..; | ||
| npx tsc; | ||
| docker pull aerospike/aerospike-server:latest; | ||
| npm run test --testfile=metrics_node_close.js -- --testMetrics true --h localhost --port 3000 --t 50000; | ||
| npm run test --testfile=metrics_cluster_name.js -- --testMetrics true --h localhost --port 3000 --t 50000; | ||
| - name: Set final commit status | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| status: ${{ job.status }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| test-ce: | ||
| needs: get-runner-os | ||
| strategy: | ||
| matrix: | ||
| nodejs-tag: ${{ fromJSON(inputs.nodejs-tags) }} | ||
| fail-fast: false | ||
| if: ${{ inputs.run_tests && (inputs.platform-tag != 'win_amd64' && inputs.platform-tag != 'macosx_x86_64') }} | ||
| runs-on: ${{ needs.get-runner-os.outputs.runner-os }} | ||
| env: | ||
| BUILD_IDENTIFIER: "${{ matrix.nodejs-tag[0] }}-${{ inputs.platform-tag }}" | ||
| steps: | ||
| # REUSABLE PART | ||
| - name: Create status check message | ||
| run: echo STATUS_CHECK_MESSAGE="test-ce (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV | ||
| shell: bash | ||
| - name: Show job status for commit | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| with: | ||
| submodules: recursive | ||
| # We need the last tag before the ref, so we can relabel the version if needed | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| with: | ||
| node-version: ${{ matrix.nodejs-tag[1] }} | ||
| - name: Run latest Community edition Aerospike server | ||
| if: ${{ inputs.run_tests && startsWith(inputs.platform-tag, 'manylinux') }} | ||
| run: docker run -d --name aerospike -e DEFAULT_TTL=2592000 -p 3000-3002:3000-3002 aerospike/aerospike-server:8.1.0.0-rc5 | ||
| - uses: ./.github/actions/wait-for-as-server-to-start | ||
| with: | ||
| container-name: aerospike | ||
| - name: Set up JFrog credentials | ||
| uses: jfrog/setup-jfrog-cli@88e9eba31c07e31beefa4cef5c0e93d1af9535d7 # v4.6.1 | ||
| env: | ||
| JF_URL: ${{ secrets.king_health }} | ||
| with: | ||
| oidc-provider-name: gh-aerospike-clients | ||
| oidc-audience: aerospike/clients | ||
| - name: Download Artifacts from Jfrog | ||
| run: jf rt dl "clients-npm-dev-local/aerospike/${{ env.NEW_VERSION }}/" "downloaded-artifacts/" | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| PACKAGE_MANAGER: npm | ||
| - name: list Artifacts | ||
| run: | | ||
| ls downloaded-artifacts | ||
| ls downloaded-artifacts/aerospike | ||
| ls downloaded-artifacts/aerospike/${{ env.NEW_VERSION }} | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| - name: Move artifacts | ||
| run: | | ||
| tar --strip-components=1 -xvf aerospike-${{ env.NEW_VERSION }}.tgz | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: check binding | ||
| run: | ||
| ls lib/binding; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Change install command for release | ||
| run: node ./scripts/change-install-command.js | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Run tests | ||
| if: ${{ inputs.run_tests && startsWith(inputs.platform-tag, 'manylinux') }} | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| run: | | ||
| docker ps; | ||
| docker logs aerospike; | ||
| cd ts-test; | ||
| npm ci; | ||
| npx tsc; | ||
| cd ..; | ||
| npx tsc; | ||
| npm run test dist/ -- --h localhost --port 3000; | ||
| - name: Set final commit status | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| status: ${{ job.status }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| # test-lowest-supported-server: | ||
| # needs: get-runner-os | ||
| # strategy: | ||
| # matrix: | ||
| # nodejs-tag: ${{ fromJSON(inputs.nodejs-tags) }} | ||
| # fail-fast: false | ||
| # #if: ${{ inputs.platform-tag == 'manylinux_x86_64' }} | ||
| # runs-on: ${{ needs.get-runner-os.outputs.runner-os }} | ||
| # env: | ||
| # BUILD_IDENTIFIER: "${{ matrix.nodejs-tag[0] }}-${{ inputs.platform-tag }}" | ||
| # steps: | ||
| # | ||
| # # REUSABLE PART | ||
| # - name: Create status check message | ||
| # run: echo STATUS_CHECK_MESSAGE="test-lowest-supported-server (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV | ||
| # shell: bash | ||
| # | ||
| # - name: Show job status for commit | ||
| # uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| # if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| # with: | ||
| # sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| # context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| # | ||
| # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| # with: | ||
| # submodules: recursive | ||
| # # We need the last tag before the ref, so we can relabel the version if needed | ||
| # fetch-depth: 0 | ||
| # | ||
| # - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| # with: | ||
| # node-version: ${{ matrix.nodejs-tag[1] }} | ||
| # | ||
| # - name: Remove aerospike docker image | ||
| # if: ${{ inputs.platform-tag == 'manylinux_aarch64' }} | ||
| # run: | | ||
| # if docker ps -aq | grep -q .; then | ||
| # docker rm -f $(docker ps -aq) || echo "Failed to remove one or more containers." | ||
| # else | ||
| # echo "No containers to remove." | ||
| # fi | ||
| # | ||
| # - name: Run lowest supported server | ||
| # run: | | ||
| # SERVER_VERSION=$(curl -s "https://registry.hub.docker.com/v2/repositories/aerospike/aerospike-server/tags?page_size=100" | jq '.results[] | select(.name | startswith("6.1")).name' -r | head -n 1) | ||
| # docker run -d --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server:$SERVER_VERSION | ||
| # | ||
| # # FIND NO SERVER TESTS AND RUN THEM | ||
| # # | ||
| # #- name: If not running tests against server, only run basic import test | ||
| # # if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'false' }} | ||
| # # # Use double quotes otherwise Windows will throw this error in cibuildwheel | ||
| # # # 'import | ||
| # # # ^ | ||
| # # # SyntaxError: EOL while scanning string literal | ||
| # # run: echo "TEST_COMMAND=python -c \"import aerospike\"" >> $GITHUB_ENV | ||
| # # shell: bash | ||
| # | ||
| # #- name: Otherwise, enable integration tests | ||
| # # if: ${{ env.RUN_INTEGRATION_TESTS_IN_CIBW == 'true' }} | ||
| # # run: echo "TEST_COMMAND=cd ts-test; | ||
| # # npm install typescript --ignore-scripts --save-dev --save-dev; | ||
| # # npx tsc; | ||
| # # cd ..; | ||
| # # npm run test dist/ -- --h 127.0.0.1 --port 3000" >> $GITHUB_ENV | ||
| # # shell: bash | ||
| # | ||
| # | ||
| # - name: Download artifacts | ||
| # uses: actions/download-artifact@v4 | ||
| # with: | ||
| # name: nodejs-client-artifacts | ||
| # path: ./downloaded-artifacts | ||
| # | ||
| # - name: list Artifacts first | ||
| # run: | | ||
| # ls ./downloaded-artifacts | ||
| # | ||
| # - name: Move artifacts | ||
| # run: | | ||
| # mkdir -p lib/binding | ||
| # cp -r downloaded-artifacts/* lib/binding | ||
| # | ||
| # | ||
| # - name: Delete leftover artifacts | ||
| # if: ${{ !(inputs.platform-tag == 'win_amd64') }} | ||
| # run: | | ||
| # rm -rf downloaded-artifacts/ | ||
| # | ||
| # - name: check binding | ||
| # run: | ||
| # ls lib/binding; | ||
| # | ||
| # - name: Change install command for release | ||
| # run: node ./scripts/change-install-command.js | ||
| # | ||
| # - name: Run tests | ||
| # if: ${{ inputs.run_tests && startsWith(inputs.platform-tag, 'manylinux') }} | ||
| # run: | | ||
| # docker ps; | ||
| # docker logs aerospike; | ||
| # cd ts-test; | ||
| # npm ci; | ||
| # npx tsc; | ||
| # cd ..; | ||
| # npx tsc; | ||
| # npm run test dist/ -- --h localhost --port 3000; | ||
| # | ||
| # - name: Set final commit status | ||
| # uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| # if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| # with: | ||
| # sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| # status: ${{ job.status }} | ||
| # context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| # test-self-hosted-ee: | ||
| # # There's a top-level env variable for this but we can't use it here, unfortunately | ||
| # needs: get-runner-os | ||
| # strategy: | ||
| # fail-fast: false | ||
| # matrix: | ||
| # nodejs-tag: ${{ fromJSON(inputs.nodejs-tags) }} | ||
| # runs-on: ${{ needs.get-runner-os.outputs.runner-os }} | ||
| # if: ${{ inputs.run_tests && (inputs.platform-tag == 'macosx_arm64' || inputs.platform-tag == 'win_amd64') }} | ||
| # env: | ||
| # BUILD_IDENTIFIER: "${{ matrix.nodejs-tag[0] }}-${{ inputs.platform-tag }}" | ||
| # steps: | ||
| # | ||
| # # REUSABLE SECTION | ||
| # - name: Create status check message | ||
| # run: echo STATUS_CHECK_MESSAGE="Test on self hosted (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV | ||
| # shell: bash | ||
| # | ||
| # - name: Show job status for commit | ||
| # uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| # if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| # with: | ||
| # sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| # context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| # | ||
| # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0f | ||
| # | ||
| # # Need to be able to save Docker Hub credentials to keychain | ||
| # - if: ${{ inputs.platform-tag == 'macosx_arm64' && inputs.use-server-rc }} | ||
| # run: security unlock-keychain -p ${{ secrets.song_loss }} | ||
| # | ||
| # - name: Remove aerospike docker image | ||
| # if: ${{ inputs.platform-tag == 'macosx_arm64' }} | ||
| # run: | | ||
| # if docker ps -aq | grep -q .; then | ||
| # docker rm -f $(docker ps -aq) || echo "Failed to remove one or more containers." | ||
| # else | ||
| # echo "No containers to remove." | ||
| # fi | ||
| # | ||
| # - name: Remove aerospike docker image | ||
| # if: ${{ inputs.platform-tag == 'win_amd64' }} | ||
| # run: | | ||
| # if (docker ps -aq) { | ||
| # docker ps -aq | ForEach-Object { docker rm -f $_ } || Write-Host "Failed to remove one or more containers." | ||
| # } | ||
| # else { | ||
| # Write-Host "No containers to remove." | ||
| # } | ||
| # | ||
| # - name: 'macOS x86: run Aerospike server in Docker container and connect via localhost' | ||
| # uses: ./.github/actions/run-ee-server-for-ext-container | ||
| # with: | ||
| # use-server-rc: ${{ inputs.use-server-rc }} | ||
| # server-tag: ${{ inputs.server-tag }} | ||
| # docker-hub-username: ${{ secrets.soup_hat }} | ||
| # docker-hub-password: ${{ secrets.cell_girl }} | ||
| # | ||
| # - name: Download artifacts | ||
| # uses: actions/download-artifact@v4 | ||
| # with: | ||
| # name: nodejs-client-artifacts | ||
| # path: ./downloaded-artifacts | ||
| # | ||
| # - name: list Artifacts first | ||
| # run: | | ||
| # ls ./downloaded-artifacts | ||
| # | ||
| # - name: Move artifacts | ||
| # run: | | ||
| # mkdir -p lib/binding | ||
| # cp -r downloaded-artifacts/* lib/binding | ||
| # | ||
| # | ||
| # - name: Delete leftover artifacts | ||
| # if: ${{ !(inputs.platform-tag == 'win_amd64') }} | ||
| # run: | | ||
| # rm -rf downloaded-artifacts/ | ||
| # | ||
| # - name: check binding | ||
| # run: | | ||
| # ls lib/binding; | ||
| # | ||
| # | ||
| # #- name: Change install command for release | ||
| # # run: node ./scripts/change-install-command.js | ||
| # | ||
| # #- name: npm ci | ||
| # # run: npm ci | ||
| # | ||
| # - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| # #if: ${{ inputs.platform-tag == 'macosx_arm64' }} | ||
| # with: | ||
| # node-version: ${{ matrix.nodejs-tag[1] }} | ||
| # path: ./lib/binding/node-${{ matrix.nodejs-tag[0] }}-darwin-arm64/ | ||
| # | ||
| # | ||
| # - name: Connect to Docker container on remote machine with Docker daemon | ||
| # if: ${{ inputs.platform-tag == 'win_amd64' }} | ||
| # # DOCKER_HOST contains the IP address of the remote machine | ||
| # run: | | ||
| # $env:DOCKER_HOST_IP = $env:DOCKER_HOST | foreach {$_.replace("tcp://","")} | foreach {$_.replace(":2375", "")} | ||
| # crudini --set config.conf enterprise-edition hosts ${env:DOCKER_HOST_IP}:3000 | ||
| # working-directory: .github\workflows | ||
| # | ||
| # # REUSABLE SECTION | ||
| # | ||
| # - name: Run tests | ||
| # if: ${{ inputs.platform-tag == 'win_amd64' }} | ||
| # run: | | ||
| # docker ps; | ||
| # docker logs aerospike; | ||
| # cd ts-test; | ||
| # npm ci; | ||
| # npx tsc; | ||
| # cp tests\udf.lua dist\udf.lua; | ||
| # npx mocha dist -- --h ${env:DOCKER_HOST_IP} --port 3000 --U superuser --P superuser; | ||
| # cd ..; | ||
| # npx tsc; | ||
| # | ||
| # - name: Run tests | ||
| # if: ${{ inputs.platform-tag == 'macosx_arm64' }} | ||
| # run: | | ||
| # docker ps; | ||
| # docker logs aerospike; | ||
| # cd ts-test; | ||
| # npm ci; | ||
| # npx tsc; | ||
| # cd ..; | ||
| # npx tsc; | ||
| # npm run test dist/ -- --h localhost --port 3000 --t 15000 --U superuser --P superuser; | ||
| # | ||
| # | ||
| # - name: Show job status for commit | ||
| # if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| # uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| # with: | ||
| # sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| # status: ${{ job.status }} | ||
| # context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| test-tsc-compile-self-hosted: | ||
| # There's a top-level env variable for this but we can't use it here, unfortunately | ||
| needs: get-runner-os | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| nodejs-tag: ${{ fromJSON(inputs.nodejs-tags) }} | ||
| runs-on: ${{ needs.get-runner-os.outputs.runner-os }} | ||
| if: ${{ inputs.run_tests && (inputs.platform-tag == 'macosx_arm64' || inputs.platform-tag == 'win_amd64') }} | ||
| env: | ||
| BUILD_IDENTIFIER: "${{ matrix.nodejs-tag[0] }}-${{ inputs.platform-tag }}" | ||
| steps: | ||
| # REUSABLE SECTION | ||
| - name: Create status check message | ||
| run: echo STATUS_CHECK_MESSAGE="Test on self hosted (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV | ||
| shell: bash | ||
| - name: Show job status for commit | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| # Need to be able to save Docker Hub credentials to keychain | ||
| - if: ${{ inputs.platform-tag == 'macosx_arm64' && inputs.use-server-rc }} | ||
| run: security unlock-keychain -p ${{ secrets.song_loss }} | ||
| - name: Set up JFrog credentials | ||
| uses: jfrog/setup-jfrog-cli@88e9eba31c07e31beefa4cef5c0e93d1af9535d7 # v4.6.1 | ||
| env: | ||
| JF_URL: ${{ secrets.king_health }} | ||
| with: | ||
| oidc-provider-name: gh-aerospike-clients | ||
| oidc-audience: aerospike/clients | ||
| - name: Download Artifacts from Jfrog | ||
| run: jf rt dl "clients-npm-dev-local/aerospike/${{ env.NEW_VERSION }}/" "downloaded-artifacts/" | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| PACKAGE_MANAGER: npm | ||
| - name: list Artifacts | ||
| run: | | ||
| ls downloaded-artifacts | ||
| ls downloaded-artifacts/aerospike | ||
| ls downloaded-artifacts/aerospike/${{ env.NEW_VERSION }} | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| - name: Move artifacts | ||
| run: | | ||
| tar --strip-components=1 -xvf aerospike-${{ env.NEW_VERSION }}.tgz | ||
| env: | ||
| NEW_VERSION: ${{ inputs.version }} | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: check binding | ||
| run: | ||
| ls lib/binding; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Change install command for release | ||
| run: node ./scripts/change-install-command.js | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| #- name: npm ci | ||
| # run: npm ci | ||
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| #if: ${{ inputs.platform-tag == 'macosx_arm64' }} | ||
| with: | ||
| node-version: ${{ matrix.nodejs-tag[1] }} | ||
| # REUSABLE SECTION | ||
| - name: Run tests | ||
| if: ${{ inputs.platform-tag == 'win_amd64' }} | ||
| run: | | ||
| npm ci --only=dev; | ||
| npx tsc; | ||
| npx tsc typings/index.d.ts; | ||
| cd ts-test; | ||
| npm ci; | ||
| npx tsc; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Run tests | ||
| if: ${{ inputs.platform-tag == 'macosx_arm64' }} | ||
| run: | | ||
| npm ci --only=dev; | ||
| npx tsc; | ||
| npx tsc typings/index.d.ts; | ||
| cd ts-test; | ||
| npm ci; | ||
| npx tsc; | ||
| working-directory: downloaded-artifacts/aerospike/${{ inputs.version }} | ||
| - name: Show job status for commit | ||
| if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| with: | ||
| sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| status: ${{ job.status }} | ||
| context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| # | ||
| # test-ce-self-hosted: | ||
| # needs: get-runner-os | ||
| # # There's a top-level env variable for this but we can't use it here, unfortunately | ||
| # strategy: | ||
| # fail-fast: false | ||
| # matrix: | ||
| # nodejs-tag: ${{ fromJSON(inputs.nodejs-tags) }} | ||
| # runs-on: ${{ needs.get-runner-os.outputs.runner-os }} | ||
| # if: ${{ inputs.run_tests && (inputs.platform-tag == 'macosx_arm64') }} | ||
| # env: | ||
| # BUILD_IDENTIFIER: "${{ matrix.nodejs-tag[0] }}-${{ inputs.platform-tag }}" | ||
| # steps: | ||
| # | ||
| # # REUSABLE SECTION | ||
| # - name: Create status check message | ||
| # run: echo STATUS_CHECK_MESSAGE="Test on self hosted (${{ env.BUILD_IDENTIFIER }})" >> $GITHUB_ENV | ||
| # shell: bash | ||
| # | ||
| # - name: Show job status for commit | ||
| # uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| # if: ${{ github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| # with: | ||
| # sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| # context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| # | ||
| # - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| # | ||
| # # Need to be able to save Docker Hub credentials to keychain | ||
| # - if: ${{ inputs.platform-tag == 'macosx_arm64' && inputs.use-server-rc }} | ||
| # run: security unlock-keychain -p ${{ secrets.song_loss }} | ||
| # | ||
| # - name: Remove aerospike docker image | ||
| # if: ${{ inputs.platform-tag == 'macosx_arm64' }} | ||
| # run: | | ||
| # if docker ps -aq | grep -q .; then | ||
| # docker rm -f $(docker ps -aq) || echo "Failed to remove one or more containers." | ||
| # else | ||
| # echo "No containers to remove." | ||
| # fi | ||
| # | ||
| # - name: Remove aerospike docker image | ||
| # if: ${{ inputs.platform-tag == 'win_amd64' }} | ||
| # run: | | ||
| # if (docker ps -aq) { | ||
| # docker ps -aq | ForEach-Object { docker rm -f $_ } || Write-Host "Failed to remove one or more containers." | ||
| # } | ||
| # else { | ||
| # Write-Host "No containers to remove." | ||
| # } | ||
| # | ||
| # - name: Run latest Community edition Aerospike server | ||
| # run: docker run -d --network=host --name aerospike -p 3000-3002:3000-3002 aerospike/aerospike-server | ||
| # | ||
| # - name: Download artifacts | ||
| # uses: actions/download-artifact@v4 | ||
| # with: | ||
| # name: nodejs-client-artifacts | ||
| # path: ./downloaded-artifacts | ||
| # | ||
| # - name: list Artifacts first | ||
| # run: | | ||
| # ls ./downloaded-artifacts | ||
| # | ||
| # - name: Move artifacts | ||
| # run: | | ||
| # mkdir -p lib/binding | ||
| # cp -r downloaded-artifacts/* lib/binding | ||
| # | ||
| # | ||
| # - name: Delete leftover artifacts | ||
| # if: ${{ !(inputs.platform-tag == 'win_amd64') }} | ||
| # run: | | ||
| # rm -rf downloaded-artifacts/ | ||
| # | ||
| # - name: check binding | ||
| # run: | | ||
| # ls lib/binding; | ||
| # | ||
| # | ||
| # #- name: Change install command for release | ||
| # # run: node ./scripts/change-install-command.js | ||
| # | ||
| # #- name: npm ci | ||
| # # run: npm ci | ||
| # | ||
| # - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| # # if: ${{ inputs.platform-tag == 'macosx_arm64' }} | ||
| # with: | ||
| # node-version: ${{ matrix.nodejs-tag[1] }} | ||
| # path: ./lib/binding/node-${{ matrix.nodejs-tag[0] }}-darwin-arm64/ | ||
| # | ||
| # | ||
| # - name: Connect to Docker container on remote machine with Docker daemon | ||
| # if: ${{ inputs.platform-tag == 'win_amd64' }} | ||
| # # DOCKER_HOST contains the IP address of the remote machine | ||
| # run: | | ||
| # $env:DOCKER_HOST_IP = $env:DOCKER_HOST | foreach {$_.replace("tcp://","")} | foreach {$_.replace(":2375", "")} | ||
| # crudini --set config.conf community-edition hosts ${env:DOCKER_HOST_IP}:3000 | ||
| # working-directory: .github\workflows | ||
| # | ||
| # # REUSABLE SECTION | ||
| # | ||
| # - name: Run tests | ||
| # if: ${{ inputs.platform-tag == 'win_amd64' }} | ||
| # run: | | ||
| # docker ps; | ||
| # docker logs aerospike; | ||
| # cd ts-test; | ||
| # npm ci; | ||
| # npx tsc; | ||
| # cp tests\udf.lua dist\udf.lua; | ||
| # npx mocha dist -- --h ${env:DOCKER_HOST_IP} --port 3000; | ||
| # cd ..; | ||
| # npx tsc; | ||
| # | ||
| # - name: Run tests | ||
| # if: ${{ inputs.platform-tag == 'macosx_arm64' }} | ||
| # run: | | ||
| # docker ps; | ||
| # docker logs aerospike; | ||
| # cd ts-test; | ||
| # npm ci; | ||
| # npx tsc; | ||
| # cd ..; | ||
| # npx tsc; | ||
| # npm run test dist/ -- --h localhost --port 3000 --t 15000; | ||
| # | ||
| # | ||
| # - name: Show job status for commit | ||
| # if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} | ||
| # uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # 2.0.1 | ||
| # with: | ||
| # sha: ${{ env.COMMIT_SHA_TO_BUILD_AND_TEST }} | ||
| # status: ${{ job.status }} | ||
| # context: ${{ env.STATUS_CHECK_MESSAGE }} | ||
| # | ||
| # | ||
| # | ||