Skip to content

Commit

Permalink
chore(tooling): setup GitHub actions, add CODEOWNERS and PR template
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts committed Nov 29, 2021
1 parent 459e628 commit 07aeafe
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Default owners

- @algolia/data-ingestion
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## 🧭 What and Why

🎟 JIRA Ticket:

### Changes included:

- List changes

## 🧪 Test

- `yarn dev`
43 changes: 43 additions & 0 deletions .github/workflows/client_javascript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: client_javascript

on: [push]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: ['16']
steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'

- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: Install Dependencies
run: yarn install

- 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: Lint
run: yarn lint:js --check
37 changes: 37 additions & 0 deletions .github/workflows/specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: specs

on: [push]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: ['16']
steps:
- uses: actions/checkout@v2

- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'

- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache-dependency-path: 'yarn.lock'

- name: Install Dependencies
run: yarn install

- name: Build
run: yarn build:spec

- name: Validate
run: yarn validate

- name: Lint
run: yarn lint:specs --check
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
"playground/javascript/"
],
"scripts": {
"build:spec:recommend:json": "yarn swagger-cli bundle specs/recommend/spec.yml --outfile dist/openapi.json --type json",
"build:spec:search:json": "yarn swagger-cli bundle specs/search/spec.yml --outfile dist/openapi.json --type json",
"build:spec:recommend": "yarn swagger-cli bundle specs/recommend/spec.yml --outfile dist/recommend.yml --type yaml",
"build:spec:search": "yarn swagger-cli bundle specs/search/spec.yml --outfile dist/search.yml --type yaml",
"build:spec:json": "yarn build:spec:search:json",
"build:spec:recommend:json": "yarn swagger-cli bundle specs/recommend/spec.yml --outfile specs/dist/recommend.json --type json",
"build:spec:search:json": "yarn swagger-cli bundle specs/search/spec.yml --outfile specs/dist/search.json --type json",
"build:spec:recommend": "yarn swagger-cli bundle specs/recommend/spec.yml --outfile specs/dist/recommend.yml --type yaml",
"build:spec:search": "yarn swagger-cli bundle specs/search/spec.yml --outfile specs/dist/search.yml --type yaml",
"build:spec:json": "yarn build:spec:search:json && yarn build:spec:recommend:json",
"build:spec": "yarn build:spec:search && yarn build:spec:recommend",
"clean": "rm -rf **/dist **/build **/node_modules",
"client:build-js": "yarn workspace @algolia/recommend build && yarn workspace @algolia/client-search build",
"client:build-js:search": "yarn workspace @algolia/client-search build",
"client:build-js:recommend": "yarn workspace @algolia/client-search build",
"client:build-js": "yarn client:build-js:search && yarn client:build-js:recommend",
"client:build": "yarn client:build-js",
"lint:js": "yarn prettier --write clients/algoliasearch-client-javascript",
"lint:specs": "yarn prettier --write specs",
Expand All @@ -26,7 +28,8 @@
"generate": "yarn generate:js && yarn lint",
"playground:js:search": "yarn workspace javascript-playground start:search",
"playground:js:recommend": "yarn workspace javascript-playground start:recommend",
"utils:import-js": "mkdir -p -- clients/algoliasearch-client-javascript/${CLIENT}/utils && cp -R clients/algoliasearch-client-javascript/utils/ clients/algoliasearch-client-javascript/${CLIENT}/utils"
"utils:import-js": "mkdir -p -- clients/algoliasearch-client-javascript/${CLIENT}/utils && cp -R clients/algoliasearch-client-javascript/utils/ clients/algoliasearch-client-javascript/${CLIENT}/utils",
"validate": "yarn swagger-cli validate specs/dist/search.yml && yarn swagger-cli validate specs/dist/recommend.yml"
},
"devDependencies": {
"@openapitools/openapi-generator-cli": "^2.4.13",
Expand Down

0 comments on commit 07aeafe

Please sign in to comment.