-
Notifications
You must be signed in to change notification settings - Fork 25
chore(ci): re-use workflows, use composite action, cache built client. #31
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
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5f69568
chore(ci): use composite action
shortcuts 30f92e4
fix: folders
shortcuts 414d31f
fix: unify workflows, use more cache
shortcuts b2c2de8
add yamllint config
shortcuts c829987
fix: yamllint options, GA cache keys
shortcuts c891c2e
apply changes from suggestion
shortcuts 8910bd0
fix: java version
shortcuts 22246e6
lint specs
shortcuts File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Cache | ||
|
||
description: Restore cached dependencies. | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Get yarn cache directory path | ||
shell: bash | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Restore yarn cache | ||
uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: Restore node_modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: '**/node_modules' | ||
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Setup | ||
|
||
description: Setup CI environment. | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Restore cache | ||
uses: ./.github/actions/cache | ||
|
||
- name: Update apt packages | ||
shell: bash | ||
run: sudo apt update | ||
|
||
- name: Install Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11.0.4' | ||
|
||
- name: Install Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Install JavaScript Dependencies | ||
shell: bash | ||
run: yarn install | ||
|
||
- name: Install spec linter | ||
shell: bash | ||
run: sudo apt-get -y install yamllint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Checks | ||
|
||
on: [push] | ||
|
||
jobs: | ||
setup: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup | ||
uses: ./.github/actions/setup | ||
|
||
specs: | ||
runs-on: ubuntu-20.04 | ||
needs: setup | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Restore cache | ||
uses: ./.github/actions/cache | ||
|
||
- name: Build | ||
run: yarn build:spec | ||
|
||
- name: Validate | ||
run: yarn validate | ||
|
||
- name: Lint | ||
run: yamllint specs | ||
|
||
client_javascript: | ||
runs-on: ubuntu-20.04 | ||
needs: [setup, specs] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Restore cache | ||
uses: ./.github/actions/cache | ||
|
||
- name: Generate search client | ||
run: yarn generate:js:search | ||
|
||
- name: Build search client | ||
run: yarn client:build-js:search | ||
|
||
- name: Generate recommend client | ||
run: yarn generate:js:recommend | ||
|
||
- name: Build recommend client | ||
run: yarn client:build-js:recommend | ||
|
||
- name: Generate personalization client | ||
run: yarn generate:js:personalization | ||
|
||
- name: Build personalization client | ||
run: yarn client:build-js:personalization | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
cts: | ||
runs-on: ubuntu-20.04 | ||
needs: [setup, specs, client_javascript] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Restore cache | ||
uses: ./.github/actions/cache | ||
|
||
- name: Generate clients | ||
run: yarn generate | ||
|
||
- name: Build client | ||
run: yarn client:build | ||
|
||
- name: Generate CTS | ||
run: yarn cts:generate | ||
|
||
- name: Run CTS | ||
run: yarn cts:test |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
shortcuts marked this conversation as resolved.
Show resolved
Hide resolved
|
||
yaml-files: | ||
- '*.yml' | ||
|
||
rules: | ||
line-length: disable | ||
braces: enable | ||
brackets: enable | ||
colons: enable | ||
commas: enable | ||
comments: | ||
level: warning | ||
comments-indentation: | ||
level: warning | ||
document-end: disable | ||
document-start: { present: false } | ||
empty-lines: enable | ||
empty-values: disable | ||
hyphens: enable | ||
indentation: enable | ||
key-duplicates: enable | ||
key-ordering: disable | ||
new-line-at-end-of-file: enable | ||
new-lines: enable | ||
octal-values: disable | ||
quoted-strings: disable | ||
trailing-spaces: enable | ||
truthy: | ||
level: warning |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# handle /2/filters?search= as well | ||
get: | ||
# handle /2/filters?search= as well |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.