Skip to content

Commit e30bd50

Browse files
authored
Merge pull request #270 from weaviate/chore/split-auth-test-in-ci
Separate auth tests in CI to reduce flakes due to rate limits
2 parents d38e91a + d9ba996 commit e30bd50

File tree

1 file changed

+33
-7
lines changed

1 file changed

+33
-7
lines changed

.github/workflows/main.yaml

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
npm run format:check
3030
npm run docs
3131
32-
tests:
32+
tests-without-auth:
3333
needs: checks
3434
runs-on: ubuntu-latest
3535
strategy:
@@ -47,6 +47,37 @@ jobs:
4747
]
4848
steps:
4949
- uses: actions/checkout@v3
50+
- uses: actions/setup-node@v3
51+
with:
52+
node-version: ${{ matrix.versions.node }}
53+
- name: Login to Docker Hub
54+
if: ${{ !github.event.pull_request.head.repo.fork && github.triggering_actor != 'dependabot[bot]' }}
55+
uses: docker/login-action@v3
56+
with:
57+
username: ${{secrets.DOCKER_USERNAME}}
58+
password: ${{secrets.DOCKER_PASSWORD}}
59+
- name: "Install dependencies"
60+
run: |
61+
npm ci
62+
ci/run_dependencies.sh ${{ matrix.versions.weaviate }}
63+
- name: "Run tests without authentication tests"
64+
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test
65+
- name: "Transpile the package"
66+
run: npm run build
67+
- name: "Stop Weaviate"
68+
run: ci/stop_dependencies.sh ${{ matrix.versions.weaviate }}
69+
70+
tests-with-auth:
71+
needs: checks
72+
runs-on: ubuntu-latest
73+
strategy:
74+
fail-fast: false
75+
matrix:
76+
versions: [
77+
{ node: "22.x", weaviate: $WEAVIATE_129}
78+
]
79+
steps:
80+
- uses: actions/checkout@v3
5081
- uses: actions/setup-node@v3
5182
with:
5283
node-version: ${{ matrix.versions.node }}
@@ -68,16 +99,11 @@ jobs:
6899
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
69100
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
70101
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test
71-
- name: "Run tests without authentication tests (for forks)"
72-
if: ${{ github.event.pull_request.head.repo.fork }}
73-
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test
74-
- name: "Transpile the package"
75-
run: npm run build
76102
- name: "Stop Weaviate"
77103
run: ci/stop_dependencies.sh ${{ matrix.versions.weaviate }}
78104

79105
publish:
80-
needs: tests
106+
needs: [tests-with-auth, tests-without-auth]
81107
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
82108
runs-on: ubuntu-latest
83109
permissions:

0 commit comments

Comments
 (0)