Feat/introduce web client #1107
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
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '**' | |
pull_request: | |
env: | |
WEAVIATE_124: 1.24.26 | |
WEAVIATE_125: 1.25.34 | |
WEAVIATE_126: 1.26.17 | |
WEAVIATE_127: 1.27.27 | |
WEAVIATE_128: 1.28.16 | |
WEAVIATE_129: 1.29.8 | |
WEAVIATE_130: 1.30.7 | |
WEAVIATE_131: 1.31.0 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
checks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: "Run checks" | |
run: | | |
npm run ci:checks | |
npm run lint | |
npm run format:check | |
npm run docs | |
npm run build | |
tests-without-auth: | |
needs: checks | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
versions: [ | |
{ node: "22.x", weaviate: $WEAVIATE_124}, | |
{ node: "22.x", weaviate: $WEAVIATE_125}, | |
{ node: "22.x", weaviate: $WEAVIATE_126}, | |
{ node: "22.x", weaviate: $WEAVIATE_127}, | |
{ node: "22.x", weaviate: $WEAVIATE_128}, | |
{ node: "22.x", weaviate: $WEAVIATE_129}, | |
{ node: "18.x", weaviate: $WEAVIATE_130}, | |
{ node: "20.x", weaviate: $WEAVIATE_130}, | |
{ node: "22.x", weaviate: $WEAVIATE_130} | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Login to Docker Hub | |
if: ${{ !github.event.pull_request.head.repo.fork && github.triggering_actor != 'dependabot[bot]' }} | |
uses: docker/login-action@v3 | |
with: | |
username: ${{secrets.DOCKER_USERNAME}} | |
password: ${{secrets.DOCKER_PASSWORD}} | |
- name: "Install dependencies" | |
run: | | |
npm run ci:test | |
ci/run_dependencies.sh ${{ matrix.versions.weaviate }} | |
- name: "Run tests without authentication tests" | |
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm run test | |
- name: "Stop Weaviate" | |
run: ci/stop_dependencies.sh ${{ matrix.versions.weaviate }} | |
tests-with-auth: | |
needs: checks | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
versions: [ | |
{ node: "22.x", weaviate: $WEAVIATE_130} | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
- name: Login to Docker Hub | |
if: ${{ !github.event.pull_request.head.repo.fork && github.triggering_actor != 'dependabot[bot]' }} | |
uses: docker/login-action@v3 | |
with: | |
username: ${{secrets.DOCKER_USERNAME}} | |
password: ${{secrets.DOCKER_PASSWORD}} | |
- name: "Install dependencies" | |
run: | | |
npm run ci:test | |
ci/run_dependencies.sh ${{ matrix.versions.weaviate }} | |
- name: "Run tests with authentication tests" | |
if: ${{ !github.event.pull_request.head.repo.fork }} | |
env: | |
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }} | |
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }} | |
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} | |
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }} | |
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm run test | |
- name: "Stop Weaviate" | |
run: ci/stop_dependencies.sh ${{ matrix.versions.weaviate }} | |
publish: | |
needs: [tests-with-auth, tests-without-auth] | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to upload the release | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
steps: | |
- uses: actions/checkout@v3 | |
# Setup .npmrc file to publish to npm | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'pnpm' | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm run ci:publish | |
- run: npm run build:node | |
- run: npm run build:web | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }} | |
- run: npm run docs | |
- name: "Upload docs as pages artifact" | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./docs | |
- name: "Deploy the uploaded pages artifact" | |
uses: actions/deploy-pages@v4 | |
- name: "Create a GitHub release" | |
uses: softprops/action-gh-release@v1 | |
with: | |
generate_release_notes: true | |
draft: true |