-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): re-use workflows, use composite action, cache built client. (
#31)
- Loading branch information
Showing
10 changed files
with
193 additions
and
132 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 @@ | ||
--- | ||
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 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 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.