From 4b644372aa6a63d1b0aae1285f235b88ba16f76f Mon Sep 17 00:00:00 2001 From: Tommy Smith Date: Fri, 7 Mar 2025 14:30:26 +0000 Subject: [PATCH 1/2] Separate auth tests in CI to reduce flakes due to rate limits --- .github/workflows/main.yaml | 38 +++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 87c01d56..4729fd89 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -29,7 +29,7 @@ jobs: npm run format:check npm run docs - tests: + tests-without-auth: needs: checks runs-on: ubuntu-latest strategy: @@ -47,6 +47,37 @@ jobs: ] steps: - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.versions.node }} + - 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 ci + ci/run_dependencies.sh ${{ matrix.versions.weaviate }} + - name: "Run tests without authentication tests" + run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test + - name: "Transpile the package" + run: npm run build + - 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_129} + ] + steps: + - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: ${{ matrix.versions.node }} @@ -68,11 +99,6 @@ jobs: AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }} run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test - - name: "Run tests without authentication tests (for forks)" - if: ${{ github.event.pull_request.head.repo.fork }} - run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test - - name: "Transpile the package" - run: npm run build - name: "Stop Weaviate" run: ci/stop_dependencies.sh ${{ matrix.versions.weaviate }} From d9ba996fc4e1a1f9bb6cdca4a1148b8a5b38e231 Mon Sep 17 00:00:00 2001 From: Tommy Smith Date: Fri, 7 Mar 2025 14:33:05 +0000 Subject: [PATCH 2/2] Fix needs in publish with new jobs --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 4729fd89..b30fa219 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -103,7 +103,7 @@ jobs: run: ci/stop_dependencies.sh ${{ matrix.versions.weaviate }} publish: - needs: tests + needs: [tests-with-auth, tests-without-auth] if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') runs-on: ubuntu-latest permissions: