Skip to content

Commit

Permalink
Merge pull request #44 from kuzzleio/1.1.0-proposal
Browse files Browse the repository at this point in the history
Release 1.1.0
  • Loading branch information
Yoann-Abbes authored Feb 11, 2021
2 parents 20a9842 + d33448a commit 6d2c03b
Show file tree
Hide file tree
Showing 113 changed files with 2,736 additions and 876 deletions.
1 change: 1 addition & 0 deletions .ci/doc/templates/default.tpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import io.kuzzle.sdk.protocol.WebSocket;
import io.kuzzle.sdk.coreClasses.responses.Response;
import io.kuzzle.sdk.coreClasses.SearchResult;
import io.kuzzle.sdk.coreClasses.lang.Lang;
import java.util.*;

public class SnippetTest {
Expand Down
1 change: 1 addition & 0 deletions .ci/doc/templates/default.tpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import io.kuzzle.sdk.protocol.WebSocket
import java.util.concurrent.ExecutionException
import io.kuzzle.sdk.coreClasses.responses.Response
import io.kuzzle.sdk.coreClasses.SearchResult
import io.kuzzle.sdk.coreClasses.lang.Lang

fun main() {
val ws = WebSocket("kuzzle")
Expand Down
1 change: 1 addition & 0 deletions .ci/doc/templates/print-result-array.tpl.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import io.kuzzle.sdk.Kuzzle;
import io.kuzzle.sdk.protocol.WebSocket;
import io.kuzzle.sdk.coreClasses.responses.Response;
import io.kuzzle.sdk.coreClasses.lang.Lang;
import java.util.*;

public class SnippetTest {
Expand Down
1 change: 1 addition & 0 deletions .ci/doc/templates/print-result-array.tpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import io.kuzzle.sdk.protocol.WebSocket
import java.util.concurrent.ExecutionException
import io.kuzzle.sdk.coreClasses.responses.Response
import io.kuzzle.sdk.coreClasses.maps.KuzzleMap
import io.kuzzle.sdk.coreClasses.lang.Lang

fun main() {
val ws = WebSocket("kuzzle")
Expand Down
1 change: 1 addition & 0 deletions .ci/doc/templates/print-result-arraylist.tpl.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import io.kuzzle.sdk.Kuzzle;
import io.kuzzle.sdk.protocol.WebSocket;
import io.kuzzle.sdk.coreClasses.responses.Response;
import io.kuzzle.sdk.coreClasses.lang.Lang;
import java.util.*;

public class SnippetTest {
Expand Down
1 change: 1 addition & 0 deletions .ci/doc/templates/print-result-arraylist.tpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import io.kuzzle.sdk.protocol.WebSocket

import java.util.concurrent.ExecutionException
import io.kuzzle.sdk.coreClasses.responses.Response
import io.kuzzle.sdk.coreClasses.lang.Lang

fun main() {
val ws = WebSocket("kuzzle")
Expand Down
1 change: 1 addition & 0 deletions .ci/doc/templates/print-result.tpl.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import io.kuzzle.sdk.Kuzzle;
import io.kuzzle.sdk.protocol.WebSocket;
import io.kuzzle.sdk.coreClasses.responses.Response;
import io.kuzzle.sdk.coreClasses.lang.Lang;
import java.util.*;

public class SnippetTest {
Expand Down
1 change: 1 addition & 0 deletions .ci/doc/templates/print-result.tpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import io.kuzzle.sdk.protocol.WebSocket
import java.util.Date

import java.util.concurrent.ExecutionException
import io.kuzzle.sdk.coreClasses.lang.Lang
import io.kuzzle.sdk.coreClasses.responses.Response

fun main() {
Expand Down
1 change: 1 addition & 0 deletions .ci/doc/templates/print-search-result.tpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import io.kuzzle.sdk.protocol.WebSocket;
import io.kuzzle.sdk.coreClasses.responses.Response;
import io.kuzzle.sdk.coreClasses.SearchResult;
import io.kuzzle.sdk.coreClasses.lang.Lang;

public class SnippetTest {
private static Kuzzle kuzzle;
Expand Down
1 change: 1 addition & 0 deletions .ci/doc/templates/print-search-result.tpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import io.kuzzle.sdk.protocol.WebSocket
import java.util.concurrent.ExecutionException
import io.kuzzle.sdk.coreClasses.responses.Response
import io.kuzzle.sdk.coreClasses.SearchResult
import io.kuzzle.sdk.coreClasses.lang.Lang

fun main() {
val ws = WebSocket("kuzzle")
Expand Down
23 changes: 23 additions & 0 deletions .github/actions/dead-links/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Dead Links
description: Run Dead Links Tests
runs:
using: "composite"
steps:
- name: Install deps
run: npm ci
shell: bash
- name: Prepare documentation
run: npm run doc-prepare
shell: bash
- name: Install docs repositories
run: npx kuzdoc iterate-repos:install --repos_path doc/framework/.repos/
shell: bash
- name: Link kuzdoc
run: npx kuzdoc framework:link -d /sdk/jvm/1/ -v 1
shell: bash
- name: Install typhoeus
run: sudo gem install typhoeus
shell: bash
- name: Run dead links tests
run: cd doc/framework/ && HYDRA_MAX_CONCURRENCY=20 ruby .ci/dead-links.rb -p src/sdk/jvm/1/
shell: bash
20 changes: 20 additions & 0 deletions .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy package
description: Run Deploy package

inputs:
BINTRAY_KEY:
description: BINTRAY_KEY
required: true
BINTRAY_USER:
description: BINTRAY_USER
required: true

runs:
using: "composite"
steps:
- name: Deploy to bintray
run: ./gradlew bintrayUpload
env:
BINTRAY_KEY: ${{ inputs.BINTRAY_KEY }}
BINTRAY_USER: ${{ inputs.BINTRAY_USER }}
shell: bash
53 changes: 53 additions & 0 deletions .github/actions/doc-deploy/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy Documentation
description: Build doc, upload it to S3 and invalidate Cloudfront cache

inputs:
AWS_ACCESS_KEY_ID:
description: AWS Access key ID
required: true
AWS_SECRET_ACCESS_KEY:
description: AWS secret key
required: true
S3_BUCKET:
description: S3 bucket name
required: true
CLOUDFRONT_ID:
description: Cloudfront distribution ID
required: true
REGION:
description: AWS default region
required: true
FRAMEWORK_BRANCH:
description: Documentation framework branch to use
required: true

runs:
using: "composite"
steps:
- name: Install AWS CLI
run: |
sudo apt-get update
sudo apt-get install python python-pip
pip install awscli --upgrade --user
shell: bash
- name: Build documentation
run: |
rm -fr doc/framework
npm install --production=false
npm run doc-prepare
npm run doc-build
env:
NODE_ENV: production
FRAMEWORK_BRANCH: ${{ inputs.FRAMEWORK_BRANCH }}
shell: bash
- name: Deploy documentation
run: |
npm run doc-upload
npm run doc-cloudfront
env:
AWS_DEFAULT_REGION: ${{ inputs.REGION }}
AWS_ACCESS_KEY_ID: ${{ inputs.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ inputs.AWS_SECRET_ACCESS_KEY }}
S3_BUCKET: ${{ inputs.S3_BUCKET }}
CLOUDFRONT_DISTRIBUTION_ID: ${{ inputs.CLOUDFRONT_ID }}
shell: bash
13 changes: 13 additions & 0 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Lint
description: Run KTLint
runs:
using: "composite"
steps:
- name: Get ktlint
run: |
curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.40.0/ktlint
chmod a+x ktlint
shell: bash
- name: Run ktlint
run: ./ktlint --disabled_rules="no-wildcard-imports" "src/**/*.kt"
shell: bash
8 changes: 8 additions & 0 deletions .github/actions/snippets-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Snippets Tests
description: Run Snippets Testss
runs:
using: "composite"
steps:
- name: Launch Tests
run: docker-compose -f .ci/doc/docker-compose.yml run doc-tests index
shell: bash
8 changes: 8 additions & 0 deletions .github/actions/unit-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Unit Test
description: Run Unit Tests
runs:
using: "composite"
steps:
- name: Launch Tests
run: ./gradlew test
shell: bash
72 changes: 72 additions & 0 deletions .github/workflows/pull_request.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Pull request checks

on: [pull_request]

jobs:
lint:
name: Lint
runs-on: ubuntu-18.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "8"
architecture: x64
- uses: ./.github/actions/lint

unit-tests:
name: Unit Tests
runs-on: ubuntu-18.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "8"
architecture: x64
- uses: ./.github/actions/unit-tests

documentation-snippets-tests:
name: Documentation - Snippets Tests
runs-on: ubuntu-18.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/[email protected]
with:
node-version: "12"
- uses: ./.github/actions/snippets-tests

documentation-dead-links:
name: Documentation - Dead links check
runs-on: ubuntu-18.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/[email protected]
with:
node-version: "12"
- uses: ./.github/actions/dead-links
106 changes: 106 additions & 0 deletions .github/workflows/push_dev.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Deployment Doc Dev

on:
push:
branches:
- 1-dev

jobs:
lint:
name: Lint
runs-on: ubuntu-18.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "8"
architecture: x64
- uses: ./.github/actions/lint

unit-tests:
name: Unit Tests
runs-on: ubuntu-18.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "8"
architecture: x64
- uses: ./.github/actions/unit-tests

documentation-snippets-tests:
name: Documentation - Snippets Tests
runs-on: ubuntu-18.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/[email protected]
with:
node-version: "12"
- uses: ./.github/actions/snippets-tests

documentation-dead-links:
name: Documentation - Dead links check
runs-on: ubuntu-18.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/[email protected]
with:
node-version: "12"
- uses: ./.github/actions/dead-links


documentation-staging:
name: Documentation - Deploy to staging
runs-on: ubuntu-18.04
timeout-minutes: 30
needs: [lint, unit-tests, documentation-dead-links, documentation-snippets-tests]
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1
with:
node-version: "12"
- uses: ./.github/actions/doc-deploy
with:
REGION: us-west-2
S3_BUCKET: docs-next.kuzzle.io
CLOUDFRONT_ID: E2ZCCEK9GRB49U
FRAMEWORK_BRANCH: develop
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Loading

0 comments on commit 6d2c03b

Please sign in to comment.