Skip to content
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
2 changes: 1 addition & 1 deletion .github/actions/cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Restore cached dependencies.

inputs:
job:
description: 'The job that requires this composite'
description: The job that requires this composite
required: true

runs:
Expand Down
26 changes: 13 additions & 13 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,47 +54,47 @@ runs:
outputs:
# specs variables
RUN_SPECS_SEARCH:
description: 'Determine if the `specs_search` job should run'
description: Determine if the `specs_search` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.SEARCH_SPECS_CHANGED > 0 }}
RUN_SPECS_RECOMMEND:
description: 'Determine if the `specs_recommend` job should run'
description: Determine if the `specs_recommend` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.RECOMMEND_SPECS_CHANGED > 0 }}
RUN_SPECS_QS:
description: 'Determine if the `specs_qs` job should run'
description: Determine if the `specs_qs` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.QS_SPECS_CHANGED > 0 }}
RUN_SPECS_PERSO:
description: 'Determine if the `specs_perso` job should run'
description: Determine if the `specs_perso` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.PERSO_SPECS_CHANGED > 0 }}
RUN_SPECS_INSIGHTS:
description: 'Determine if the `specs_insights` job should run'
description: Determine if the `specs_insights` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.INSIGHTS_SPECS_CHANGED > 0 }}
RUN_SPECS_ANALYTICS:
description: 'Determine if the `specs_analytics` job should run'
description: Determine if the `specs_analytics` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.ANALYTICS_SPECS_CHANGED > 0 }}
RUN_SPECS_AB:
description: 'Determine if the `specs_ab` job should run'
description: Determine if the `specs_ab` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.AB_SPECS_CHANGED > 0 }}

# js client variables
RUN_JS_CLIENT_SEARCH:
description: 'Determine if the `client_javascript_search` job should run'
description: Determine if the `client_javascript_search` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.SEARCH_SPECS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.JS_SEARCH_CLIENT_CHANGED > 0 || steps.diff.outputs.JS_TEMPLATE_CHANGED > 0 }}
RUN_JS_CLIENT_RECOMMEND:
description: 'Determine if the `client_javascript_recommend` job should run'
description: Determine if the `client_javascript_recommend` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.RECOMMEND_SPECS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.JS_RECOMMEND_CLIENT_CHANGED > 0 || steps.diff.outputs.JS_TEMPLATE_CHANGED > 0 }}
RUN_JS_CLIENT_PERSO:
description: 'Determine if the `client_javascript_perso` job should run'
description: Determine if the `client_javascript_perso` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.PERSO_SPECS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.JS_PERSO_CLIENT_CHANGED > 0 || steps.diff.outputs.JS_TEMPLATE_CHANGED > 0 }}
RUN_JS_CLIENT_ANALYTICS:
description: 'Determine if the `client_javascript_analytics` job should run'
description: Determine if the `client_javascript_analytics` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.ANALYTICS_SPECS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.JS_ANALYTICS_CLIENT_CHANGED > 0 || steps.diff.outputs.JS_TEMPLATE_CHANGED > 0 }}

# java client variables
RUN_JAVA_CLIENT:
description: 'Determine if the `client_java_*` job should run'
description: Determine if the `client_java_*` job should run
value: ${{ github.ref == 'refs/heads/main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.COMMON_SPECS_CHANGED > 0 || steps.diff.outputs.SEARCH_SPECS_CHANGED > 0 || steps.diff.outputs.SCRIPTS_CHANGED > 0 || steps.diff.outputs.JAVA_CLIENT_CHANGED > 0 || steps.diff.outputs.JAVA_TEMPLATE_CHANGED > 0 }}

# cts variables
RUN_CTS:
description: 'Determine if the `cts` job should run'
description: Determine if the `cts` job should run
value: ${{ github.ref_name == 'main' || steps.diff.outputs.GITHUB_ACTIONS_CHANGED > 0 || steps.diff.outputs.SPECS_CHANGED > 0 || steps.diff.outputs.TESTS_CHANGED > 0 || steps.diff.outputs.JS_CLIENT_CHANGED > 0 || steps.diff.outputs.JS_TEMPLATE_CHANGED > 0 || steps.diff.outputs.JAVA_CLIENT_CHANGED > 0 || steps.diff.outputs.JAVA_TEMPLATE_CHANGED > 0 }}
28 changes: 21 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
- name: Setup
id: setup
uses: ./.github/actions/setup

- name: Lint GitHub actions
run: yarn eslint --ext=yml .github/actions .github/workflows
outputs:
RUN_SPECS_SEARCH: ${{ steps.setup.outputs.RUN_SPECS_SEARCH }}
RUN_SPECS_RECOMMEND: ${{ steps.setup.outputs.RUN_SPECS_RECOMMEND }}
Expand Down Expand Up @@ -53,6 +56,9 @@ jobs:
- name: Checking search specs
run: yarn build:specs search

- name: Lint search specs
run: yarn eslint --ext=yml specs/search

specs_recommend:
runs-on: ubuntu-20.04
needs: setup
Expand All @@ -66,6 +72,9 @@ jobs:
- name: Checking recommend specs
run: yarn build:specs recommend

- name: Lint recommend specs
run: yarn eslint --ext=yml specs/recommend

specs_perso:
runs-on: ubuntu-20.04
needs: setup
Expand All @@ -79,6 +88,9 @@ jobs:
- name: Checking personalization specs
run: yarn build:specs personalization

- name: Lint personalization specs
run: yarn eslint --ext=yml specs/personalization

specs_analytics:
runs-on: ubuntu-20.04
needs: setup
Expand All @@ -92,6 +104,9 @@ jobs:
- name: Checking analytics specs
run: yarn build:specs analytics

- name: Lint analytics specs
run: yarn eslint --ext=yml specs/analytics

client_javascript_search:
runs-on: ubuntu-20.04
needs: [specs_search]
Expand Down Expand Up @@ -222,13 +237,12 @@ jobs:
cts:
runs-on: ubuntu-20.04
needs:
[
client_javascript_search,
client_javascript_recommend,
client_javascript_perso,
client_javascript_analytics,
client_java_search,
]
- client_javascript_search
- client_javascript_recommend
- client_javascript_perso
- client_javascript_analytics
- client_java_search

if: ${{ always() && needs.setup.outputs.RUN_CTS == 'true' }}
steps:
- uses: actions/checkout@v2
Expand Down