-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[spruce] Update control plane operations #167
Changes from all commits
96012e0
d4977b0
5e5b6aa
266aa96
64d3fc9
81dcabe
7a76443
74004e2
c3b5c50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,16 @@ on: | |
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
testing: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think our Python client runs through testing on the release workflows, felt like it made sense to add it, but let me know otherwise. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice. We should test all the time. The testing prior to release is really just a final safeguard in case somebody is YOLOing something to main outside the normal process. So I'm very 👍 👍 on this change. |
||
uses: './.github/workflows/testing.yml' | ||
secrets: inherit | ||
|
||
version-and-release: | ||
name: Release dev build to NPM | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,20 +19,18 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
# integration-tests: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seemed old, we can parameterize the running of tests if desired. |
||
# if: ${{ github.event.inputs.runTests == 'true' }} | ||
# uses: ./.github/workflows/PR.yml | ||
# secrets: inherit | ||
testing: | ||
uses: './.github/workflows/testing.yml' | ||
secrets: inherit | ||
|
||
version-and-release: | ||
name: Release to NPM | ||
# needs: integration-tests | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tagName: ${{ steps.npm-release.outputs.release_tag }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
name: Testing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the logic that was pulled out of |
||
|
||
on: | ||
workflow_call: {} | ||
|
||
jobs: | ||
unit-tests: | ||
name: Run unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Run tests | ||
env: | ||
CI: true | ||
run: npm run test:unit -- --coverage | ||
|
||
integration-tests: | ||
name: Run integration tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 1 | ||
matrix: | ||
jest_env: ['node', 'edge'] | ||
pinecone_env: ['prod', 'staging'] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
- name: Run integration tests (prod) | ||
if: matrix.pinecone_env == 'prod' | ||
env: | ||
CI: true | ||
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} | ||
PINECONE_CONTROLLER_HOST: 'https://api.pinecone.io' | ||
run: npm run test:integration:${{ matrix.jest_env }} | ||
|
||
- name: Run integration tests (staging) | ||
if: matrix.pinecone_env == 'staging' | ||
env: | ||
CI: true | ||
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY_STAGING }} | ||
PINECONE_CONTROLLER_HOST: 'https://api-staging.pinecone.io' | ||
run: npm run test:integration:${{ matrix.jest_env }} | ||
|
||
typescript-compilation-tests: | ||
name: TS compile | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tsVersion: | ||
[ | ||
'~4.1.0', | ||
'~4.2.0', | ||
'~4.3.0', | ||
'~4.4.0', | ||
'~4.5.0', | ||
'~4.6.0', | ||
'~4.7.0', | ||
'~4.8.0', | ||
'~4.9.0', | ||
'~5.0.0', | ||
'~5.1.0', | ||
'~5.2.0', | ||
'latest', | ||
] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
registry-url: 'https://registry.npmjs.org' | ||
- name: Install npm packages | ||
run: | | ||
npm install --ignore-scripts | ||
shell: bash | ||
- name: Build TypeScript for Pinecone | ||
run: npm run build | ||
shell: bash | ||
- name: install, compile, and run sample app | ||
shell: bash | ||
env: | ||
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} | ||
run: | | ||
set -x | ||
cd .. | ||
cp -r pinecone-ts-client/ts-compilation-test ts-compilation-test | ||
cd ts-compilation-test | ||
npm install typescript@${{ matrix.tsVersion }} --no-cache | ||
npm install '../pinecone-ts-client' --no-cache | ||
cat package.json | ||
cat package-lock.json | ||
npm run tsc-version | ||
npm run build | ||
npm run start | ||
|
||
example-app-semantic-search: | ||
name: 'Example app: semantic search' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout pinecone-ts-client | ||
uses: actions/checkout@v4 | ||
with: | ||
path: pinecone-ts-client | ||
- name: Checkout semantic-search-example | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: pinecone-io/semantic-search-example | ||
path: semantic-search-example | ||
- name: Install and build client | ||
shell: bash | ||
run: | | ||
cd pinecone-ts-client | ||
npm install --ignore-scripts | ||
npm run build | ||
- name: Install and build sample app | ||
shell: bash | ||
run: | | ||
cd semantic-search-example | ||
npm install --no-cache | ||
npm install '../pinecone-ts-client' | ||
cat package.json | ||
- name: Run example tests with dev version of client | ||
env: | ||
CI: true | ||
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }} | ||
PINECONE_INDEX: 'semantic-search' | ||
shell: bash | ||
run: | | ||
cd semantic-search-example | ||
npm run test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was part of the integration tests work which is also included here. This block of logic was moved to
testing.yml
so it could be more easily reused.