Skip to content
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): re-use workflows, use composite action, cache built client. #31

Merged
merged 8 commits into from
Dec 7, 2021

Conversation

shortcuts
Copy link
Member

🧭 What and Why

🎟 JIRA Ticket: https://algolia.atlassian.net/browse/APIC-219

Changes included:

  • Add composite actions to remove duplicate code/logic
  • Make jobs depends on other needed jobs
  • Add yamllint linter to the CI

🧪 Test

CI :D

@shortcuts shortcuts requested review from damcou and millotp December 6, 2021 16:14
@shortcuts shortcuts self-assigned this Dec 6, 2021
@shortcuts
Copy link
Member Author

shortcuts commented Dec 6, 2021

(Will update required checks once the PR is merged, I don't think I can do it RN)

edit: NVM, it works

Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job ! The CI looks really clean !

path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Restore JavaScript client
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be cached, we want to test if this is correctly generated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed it for now as I don't have a solution yet, but we should cache clients to avoid regenerating every clients when a spec change.

I'll make sure to tackle it ASAP

.github/actions/setup/action.yml Show resolved Hide resolved
.yamllint Show resolved Hide resolved
.github/workflows/check.yml Outdated Show resolved Hide resolved
.github/actions/setup/action.yml Outdated Show resolved Hide resolved
- name: Restore cache
uses: ./.github/actions/cache

- name: Generate client
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to generate the client here if this depends on client_javascript ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless cached, jobs are running on a fresh machine, the needs field is only here to let the Action know when to start the job

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok no problem, so the cache makes more sense now

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but wasn't right on the current implementation, we should definitely have one in a near future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants