Skip to content

Commit 5e7ced1

Browse files
authored
fix(ci): prevent deleting all tests, correctly run JS tasks (#869)
1 parent 7650e52 commit 5e7ced1

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ jobs:
236236

237237
- name: Build clients
238238
if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.client.language != 'php' }}
239-
run: yarn cli build clients ${{ matrix.client.language }} ${{ matrix.client.toBuild }}
239+
run: yarn cli build clients ${{ matrix.client.language }} ${{ matrix.client.toRun }}
240240

241241
- name: Test JavaScript bundle size
242242
if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.client.language == 'javascript' }}
@@ -246,7 +246,7 @@ jobs:
246246
if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.client.language == 'javascript' }}
247247
run: cd ${{ matrix.client.path }} && yarn workspace algoliasearch test
248248

249-
- name: Clean CTS output before generate
249+
- name: Remove CTS output before generate
250250
run: rm -rf ${{ matrix.client.testsToDelete }} || true
251251

252252
- name: Generate CTS
@@ -278,7 +278,7 @@ jobs:
278278
run: yarn cli cts run ${{ matrix.client.language }}
279279

280280
- name: Zip artifact before storing
281-
run: zip -r -y clients-${{ matrix.client.language }}.zip ${{ matrix.client.path }} ${{ matrix.client.testsToStore }} -x "**/node_modules**" "**/.yarn/cache/**" "**/build/**" "**/dist/**" "**/.gradle/**" "**/bin/**" "**/vendor/**"
281+
run: zip -r -y clients-${{ matrix.client.language }}.zip ${{ matrix.client.path }} ${{ matrix.client.testsRootFolder }} -x "**/node_modules**" "**/.yarn/cache/**" "**/build/**" "**/dist/**" "**/.gradle/**" "**/bin/**" "**/vendor/**"
282282

283283
- name: Store ${{ matrix.client.language }} clients
284284
uses: actions/upload-artifact@v3

scripts/ci/githubActions/createMatrix.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,6 @@ async function getClientMatrix(baseBranch: string): Promise<void> {
9898
return `${testsOutputBase}/client/${clientName}${extension} ${testsOutputBase}/methods/requests/${clientName}${extension} ${tmpPath}`;
9999
})
100100
.join(' ');
101-
let testsToStore = testsToDelete;
102-
103-
switch (language) {
104-
case 'java':
105-
testsToStore = `${testsToDelete} ${testsRootFolder}/build.gradle`;
106-
break;
107-
default:
108-
break;
109-
}
110101

111102
clientMatrix.client.push({
112103
language,
@@ -120,7 +111,6 @@ async function getClientMatrix(baseBranch: string): Promise<void> {
120111
]),
121112
testsRootFolder,
122113
testsToDelete,
123-
testsToStore,
124114
});
125115
console.log(`::set-output name=RUN_GEN_${language.toUpperCase()}::true`);
126116
}

scripts/ci/githubActions/types.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ export type ClientMatrix = BaseMatrix & {
3737
* The test output path to delete before running the CTS generation.
3838
*/
3939
testsToDelete: string;
40-
/**
41-
* The test output path to store in the artifact.
42-
*/
43-
testsToStore: string;
4440
};
4541

4642
export type SpecMatrix = Pick<BaseMatrix, 'cacheKey' | 'toRun'> & {

0 commit comments

Comments
 (0)