diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 74b515db5eb..0e8e02c11bf 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -219,7 +219,7 @@ jobs: run: cd clients/algoliasearch-client-javascript && YARN_ENABLE_HARDENED_MODE=0 YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install - name: Build clients - run: ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).buildCommand }} + run: cd clients/algoliasearch-client-javascript && yarn build - name: Build the playground run: yarn cli build playground javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} @@ -334,6 +334,8 @@ jobs: - name: Generate clients run: yarn cli generate ${{ matrix.client.language }} ${{ matrix.client.toRun }} + # no need to build the clients here, it will be done in the Run CTS step anyway. + - name: Update composer.lock if: ${{ matrix.client.language == 'php' && startsWith(github.head_ref, 'chore/renovateBaseBranch') && matrix.client.isMainVersion }} run: cd ${{ matrix.client.path }} && composer update @@ -346,9 +348,6 @@ jobs: find Sources -type f | rev | cut -d '/' -f1 | rev | sort | uniq -d [ $(find Sources -type f | rev | cut -d '/' -f1 | rev | sort | uniq -d | wc -l) -gt 0 ] && echo "Duplicates found" && exit 1 || echo "No duplicate found" - - name: Build clients - run: ${{ matrix.client.buildCommand }} - - name: Build the playground run: yarn cli build playground ${{ matrix.client.language }} @@ -419,7 +418,8 @@ jobs: runs-on: macos-latest needs: - setup - - client_gen + - specs + - scripts if: | always() && needs.setup.outputs.RUN_GEN == 'true' && @@ -432,18 +432,19 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Download artifacts + - name: Download specs artifacts uses: ./scripts/ci/actions/restore-artifacts with: - type: languages - languages: | - kotlin + type: specs - name: Setup uses: ./.github/actions/setup with: - type: minimal language: kotlin + version: ${{ fromJSON(needs.setup.outputs.KOTLIN_DATA).version }} + + - name: Generate clients + run: yarn cli generate kotlin ${{ fromJSON(needs.setup.outputs.KOTLIN_DATA).toRun }} - name: Build clients for macOS id: build @@ -463,7 +464,8 @@ jobs: runs-on: macos-latest needs: - setup - - client_gen + - specs + - scripts if: | always() && needs.setup.outputs.RUN_GEN == 'true' && @@ -481,22 +483,24 @@ jobs: - uses: actions/checkout@v4 if: ${{ env.ALGOLIA_APPLICATION_ID != '' }} - - name: Download artifacts + - name: Download specs artifacts uses: ./scripts/ci/actions/restore-artifacts - if: ${{ env.ALGOLIA_APPLICATION_ID != '' }} with: - type: languages - languages: | - swift + type: specs - name: Setup uses: ./.github/actions/setup if: ${{ env.ALGOLIA_APPLICATION_ID != '' }} with: - type: minimal language: swift version: ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).version }} + - name: Generate clients + run: yarn cli generate swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }} + + - name: Generate tests + run: yarn cli cts generate swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }} + - name: Run tests on macOS id: run-test if: ${{ env.ALGOLIA_APPLICATION_ID != '' }} diff --git a/scripts/ci/githubActions/createMatrix.ts b/scripts/ci/githubActions/createMatrix.ts index ad662d695af..dc27cae5b52 100644 --- a/scripts/ci/githubActions/createMatrix.ts +++ b/scripts/ci/githubActions/createMatrix.ts @@ -83,7 +83,6 @@ async function createClientMatrix(baseBranch: string): Promise { language, path: matrix[language].path, toRun, - buildCommand: `yarn cli build clients ${language} ${toRun}`, testsRootFolder, // We delete tests to ensure the CI only run tests against what changed. testsToDelete: `${testsOutputBase}/client ${testsOutputBase}/requests ${testsOutputBase}/e2e ${testsOutputBase}/benchmark`, @@ -112,7 +111,6 @@ async function createClientMatrix(baseBranch: string): Promise { languageMatrix.testsToStore = `${languageMatrix.testsToStore} ${testsRootFolder}/build.gradle`; break; case 'javascript': - languageMatrix.buildCommand = `cd ${matrix[language].path} && yarn build`; languageMatrix.testsToStore = `${languageMatrix.testsToStore} ${testsRootFolder}/package.json`; setOutput('JAVASCRIPT_DATA', JSON.stringify(languageMatrix)); diff --git a/scripts/ci/githubActions/types.ts b/scripts/ci/githubActions/types.ts index 85cca94678f..9658fd6cc4e 100644 --- a/scripts/ci/githubActions/types.ts +++ b/scripts/ci/githubActions/types.ts @@ -23,10 +23,6 @@ export type ClientMatrix = { * The client language. */ language: string; - /** - * The command to build the clients. - */ - buildCommand: string; /** * The root of the test folder. */