Skip to content

chore(ci): skip CI and fix order #374

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

Merged
merged 2 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 38 additions & 40 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,42 +191,6 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: git --no-pager diff

client_javascript_algoliasearch:
timeout-minutes: 10
runs-on: ubuntu-20.04
needs: client_javascript
if: |
always() &&
needs.setup.outputs.RUN_JS_ALGOLIASEARCH == 'true' &&
!contains(needs.*.result, 'cancelled') &&
!contains(needs.*.result, 'failure')
steps:
- uses: actions/checkout@v2

- name: Restore cache
uses: ./.github/actions/cache
with:
job: codegen
language: javascript

- name: Cache 'algoliasearch' client
id: cache
uses: actions/cache@v2
with:
path: clients/algoliasearch-client-javascript/packages/algoliasearch
key: |
${{ env.CACHE_VERSION }}-${{
hashFiles(
'clients/algoliasearch-client-javascript/packages/algoliasearch/**',
'clients/algoliasearch-client-javascript/packages/client-search/**',
'clients/algoliasearch-client-javascript/packages/client-analytics/**',
'clients/algoliasearch-client-javascript/packages/client-personalization/**'
)}}

- name: Build 'algoliasearch' client
if: steps.cache.outputs.cache-hit != 'true'
run: yarn cli build clients javascript algoliasearch

client_java:
runs-on: ubuntu-20.04
timeout-minutes: 10
Expand Down Expand Up @@ -327,12 +291,46 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: git --no-pager diff

client_javascript_algoliasearch:
timeout-minutes: 10
runs-on: ubuntu-20.04
needs: client_javascript
if: |
always() &&
needs.setup.outputs.RUN_JS_ALGOLIASEARCH == 'true' &&
!contains(needs.*.result, 'cancelled') &&
!contains(needs.*.result, 'failure')
steps:
- uses: actions/checkout@v2

- name: Restore cache
uses: ./.github/actions/cache
with:
job: codegen
language: javascript

- name: Cache 'algoliasearch' client
id: cache
uses: actions/cache@v2
with:
path: clients/algoliasearch-client-javascript/packages/algoliasearch
key: |
${{ env.CACHE_VERSION }}-${{
hashFiles(
'clients/algoliasearch-client-javascript/packages/algoliasearch/**',
'clients/algoliasearch-client-javascript/packages/client-search/**',
'clients/algoliasearch-client-javascript/packages/client-analytics/**',
'clients/algoliasearch-client-javascript/packages/client-personalization/**'
)}}

- name: Build 'algoliasearch' client
if: steps.cache.outputs.cache-hit != 'true'
run: yarn cli build clients javascript algoliasearch

client_javascript_tests:
runs-on: ubuntu-20.04
timeout-minutes: 10
needs:
- client_javascript
- client_javascript_algoliasearch
needs: client_javascript
if: |
always() &&
needs.setup.outputs.RUN_JS_TESTS == 'true' &&
Expand All @@ -354,7 +352,6 @@ jobs:
timeout-minutes: 20
needs:
- client_javascript
- client_javascript_algoliasearch
- client_java
- client_php
if: |
Expand Down Expand Up @@ -390,6 +387,7 @@ jobs:
needs:
- cts
- client_javascript_tests
- client_javascript_algoliasearch
if: |
always() &&
needs.setup.outputs.RUN_CODEGEN == 'true' &&
Expand Down
4 changes: 3 additions & 1 deletion scripts/ci/codegen/pushGeneratedCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ export async function pushGeneratedCode(): Promise<void> {
}

const commitMessage =
await run(`git show -s ${baseBranch} --format="chore: generated code for commit %H.
await run(`git show -s ${baseBranch} --format="chore: generated code for commit %H. ${
isMainBranch ? '[skip ci]' : ''
}

Co-authored-by: %an <%ae>"`);

Expand Down