-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(ci): generate the CTS on the CI #489
Conversation
✅ Deploy Preview for api-clients-automation canceled.
|
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
1b9f572
to
af092f4
Compare
); | ||
await run(`git add ${FOLDERS_TO_CHECK}`); | ||
console.log(`Pushing code to generated branch: '${branchToPush}'`); | ||
await run(`git add .`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to make sure not to push deleted files for the tests, as we delete the folder before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah but yeah I forgot, the CI does not push deleted files hehehehe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this, we will see with more test I guess, anyway the CTS is pushed correctly for now ! d33031a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice :)
@@ -225,16 +225,13 @@ jobs: | |||
- name: Generate CTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be the right time to add the cache step for the CTS too :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that we only want to keep the CTS files for the current client being generated, I don't have that granularity with cache, you think we should pass the list of files to restore or something ?
@@ -17,7 +17,7 @@ module.exports = { | |||
'!clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/exceptions/**', | |||
'!clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/utils/**', | |||
|
|||
'tests/output/java/src/test/java/com/algolia/methods/**', | |||
'tests/output/java/src/test/java/com/algolia/methods/**', // this could be added automatically by the script, but with overhead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this file we should actually leverage the functions from scripts/config.ts
or directly import fields from config/clients.config.json
but it's not a big deal here (unless you want to do it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I will do it in another PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO It's not urgent to do it rn
config/generation.config.js
Outdated
'tests/output/java/src/test/java/com/algolia/methods/**', | ||
'tests/output/java/src/test/java/com/algolia/client/**', | ||
'tests/output/javascript/src/methods/**', | ||
'tests/output/java/src/test/client/**', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
javascript
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
damnit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahaha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GG!
🧭 What and Why
After this PR, all the generated code everywhere will be pushed by the CI, no need to gen a single file locally.
Changes included:
🧪 Test
CI