Skip to content

Commit 2ed1839

Browse files
authored
Merge pull request #598 from kuzzleio/7.5.3-proposal
# [7.5.3](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.5.3) (2021-01-29) #### Enhancements - [ [#596](#596) ] Error stacktrace overhaul ([Aschen](https://github.com/Aschen)) - [ [#595](#595) ] Allows to not send realtime notification on document controller ([Aschen](https://github.com/Aschen)) ---
2 parents 03eae5c + 0bcab8d commit 2ed1839

File tree

35 files changed

+1258
-810
lines changed

35 files changed

+1258
-810
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dead Links
2+
description: Run Dead Links Tests
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Install deps
7+
run: npm ci
8+
shell: bash
9+
- name: Prepare documentation
10+
run: npm run doc-prepare
11+
shell: bash
12+
- name: Install docs repositories
13+
run: npx kuzdoc iterate-repos:install --repos_path doc/framework/.repos/
14+
shell: bash
15+
- name: Link kuzdoc
16+
run: npx kuzdoc framework:link -d /sdk/js/7/ -v 7
17+
shell: bash
18+
- name: Install typhoeus
19+
run: sudo gem install typhoeus
20+
shell: bash
21+
- name: Run dead links tests
22+
run: cd doc/framework/ && HYDRA_MAX_CONCURRENCY=20 ruby .ci/dead-links.rb -p src/sdk/js/7/
23+
shell: bash
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy Documentation
2+
description: Build doc, upload it to S3 and invalidate Cloudfront cache
3+
4+
inputs:
5+
AWS_ACCESS_KEY_ID:
6+
description: AWS Access key ID
7+
required: true
8+
AWS_SECRET_ACCESS_KEY:
9+
description: AWS secret key
10+
required: true
11+
S3_BUCKET:
12+
description: S3 bucket name
13+
required: true
14+
CLOUDFRONT_ID:
15+
description: Cloudfront distribution ID
16+
required: true
17+
REGION:
18+
description: AWS default region
19+
required: true
20+
FRAMEWORK_BRANCH:
21+
description: Documentation framework branch to use
22+
required: true
23+
24+
runs:
25+
using: "composite"
26+
steps:
27+
- name: Install AWS CLI
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install python python-pip
31+
pip install awscli --upgrade --user
32+
shell: bash
33+
- name: Build documentation
34+
run: |
35+
rm -fr doc/framework
36+
npm install --production=false
37+
npm run doc-prepare
38+
npm run doc-build
39+
env:
40+
NODE_ENV: production
41+
FRAMEWORK_BRANCH: ${{ inputs.FRAMEWORK_BRANCH }}
42+
shell: bash
43+
- name: Deploy documentation
44+
run: |
45+
npm run doc-upload
46+
npm run doc-cloudfront
47+
env:
48+
AWS_DEFAULT_REGION: ${{ inputs.REGION }}
49+
AWS_ACCESS_KEY_ID: ${{ inputs.AWS_ACCESS_KEY_ID }}
50+
AWS_SECRET_ACCESS_KEY: ${{ inputs.AWS_SECRET_ACCESS_KEY }}
51+
S3_BUCKET: ${{ inputs.S3_BUCKET }}
52+
CLOUDFRONT_DISTRIBUTION_ID: ${{ inputs.CLOUDFRONT_ID }}
53+
shell: bash

.github/actions/es-lint/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: ESLint
2+
description: Run ESLint
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Install deps
7+
run: npm ci --silent
8+
shell: bash
9+
- name: Run lint
10+
run: npm run --silent test:lint
11+
shell: bash
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Functional Tests
2+
description: Run Functional Tests
3+
inputs:
4+
CYPRESS_RECORD_KEY_DOC:
5+
description: Cypress project key
6+
required: true
7+
runs:
8+
using: "composite"
9+
steps:
10+
- name: Start Kuzzle stack
11+
run: |
12+
sudo sysctl -w vm.max_map_count=262144
13+
./.ci/start_kuzzle.sh
14+
shell: bash
15+
- name: Build Kuzzle
16+
run: |
17+
npm install
18+
npm run build
19+
shell: bash
20+
- name: Run functional tests
21+
run: npm run test:functional
22+
shell: bash
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Documentation Snippets Tests
2+
description: Run Documentation Snippets Tests
3+
inputs:
4+
CYPRESS_RECORD_KEY_DOC:
5+
description: Cypress project key
6+
required: true
7+
runs:
8+
using: "composite"
9+
steps:
10+
- name: Build the Stack
11+
run: |
12+
npm install
13+
npm run build
14+
shell: bash
15+
- run: npm run doc-testing
16+
env:
17+
CYPRESS_RECORD_KEY_DOC: ${{ inputs.CYPRESS_RECORD_KEY_DOC }}
18+
shell: bash
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Test Admin Console
2+
description: Run Test Admin Console
3+
inputs:
4+
sdk-version:
5+
description: Javascript SDK version to use
6+
required: true
7+
cypress-key:
8+
description: Cypress record key
9+
required: true
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Start Kuzzle stack
14+
run: |
15+
export GITHUB_DIR=$(pwd)
16+
sudo sysctl -w vm.max_map_count=262144
17+
npm ci
18+
shell: bash
19+
- name: Setup Admin console
20+
run: |
21+
git clone -b 4-dev https://github.com/kuzzleio/kuzzle-admin-console /tmp/admin-console
22+
cp -f ./cypress.json /tmp/admin-console/cypress.json
23+
cd /tmp/admin-console
24+
npm ci
25+
npm install kuzzle-sdk-v${{ inputs.sdk-version }}@$GITHUB_DIR
26+
shell: bash
27+
- name: Run e2e tests
28+
run: |
29+
cd /tmp/admin-console/test/e2e/run-test
30+
npm ci
31+
cd /tmp/admin-console
32+
CYPRESS_RETRIES=5 npm run test:e2e -- --backend=2
33+
env:
34+
CYPRESS_RECORD_KEY: ${{ inputs.cypress-key }}
35+
shell: bash
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Unit Tests
2+
description: Run Unit Tests
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Run build
7+
run: |
8+
npm install
9+
npm run build
10+
shell: bash
11+
- name: Run tests
12+
run: |
13+
npm run test:unit
14+
cat ./coverage/lcov.info | ./node_modules/.bin/codecov
15+
shell: bash
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
name: Pull request checks
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
lint:
7+
name: Lint
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Cache node modules
12+
uses: actions/cache@v2
13+
env:
14+
cache-name: cache-node-modules
15+
with:
16+
path: ~/.npm
17+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
18+
restore-keys: |
19+
${{ runner.os }}-build-${{ env.cache-name }}-
20+
${{ runner.os }}-build-
21+
${{ runner.os }}-
22+
- uses: actions/[email protected]
23+
with:
24+
node-version: "12"
25+
- uses: ./.github/actions/es-lint
26+
27+
unit-tests:
28+
name: Unit Tests
29+
runs-on: ubuntu-18.04
30+
needs: [lint]
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: Cache node modules
34+
uses: actions/cache@v2
35+
env:
36+
cache-name: cache-node-modules
37+
with:
38+
path: ~/.npm
39+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
40+
restore-keys: |
41+
${{ runner.os }}-build-${{ env.cache-name }}-
42+
${{ runner.os }}-build-
43+
${{ runner.os }}-
44+
- uses: actions/[email protected]
45+
with:
46+
node-version: "12"
47+
- uses: ./.github/actions/unit-tests
48+
49+
functional-tests:
50+
name: Functional Tests
51+
runs-on: ubuntu-18.04
52+
needs: [unit-tests]
53+
steps:
54+
- uses: actions/checkout@v2
55+
with:
56+
submodules: 'recursive'
57+
- name: Cache node modules
58+
uses: actions/cache@v2
59+
env:
60+
cache-name: cache-node-modules
61+
with:
62+
path: ~/.npm
63+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
64+
restore-keys: |
65+
${{ runner.os }}-build-${{ env.cache-name }}-
66+
${{ runner.os }}-build-
67+
${{ runner.os }}-
68+
- uses: actions/[email protected]
69+
with:
70+
node-version: "12"
71+
- uses: ./.github/actions/functional-tests
72+
with:
73+
CYPRESS_RECORD_KEY_DOC: ${{ secrets.CYPRESS_RECORD_KEY_DOC }}
74+
75+
admin-console-tests:
76+
name: Admin Console Tests
77+
runs-on: ubuntu-18.04
78+
needs: [unit-tests]
79+
steps:
80+
- uses: actions/checkout@v2
81+
- name: Cache node modules
82+
uses: actions/cache@v2
83+
env:
84+
cache-name: cache-node-modules
85+
with:
86+
path: ~/.npm
87+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
88+
restore-keys: |
89+
${{ runner.os }}-build-${{ env.cache-name }}-
90+
${{ runner.os }}-build-
91+
${{ runner.os }}-
92+
- uses: actions/setup-node@v1
93+
with:
94+
node-version: "12"
95+
- uses: ./.github/actions/tests-ac
96+
with:
97+
sdk-version: 7
98+
cypress-key: ${{ secrets.CYPRESS_RECORD_KEY }}
99+
100+
documentation-dead-links:
101+
name: Dead links
102+
runs-on: ubuntu-18.04
103+
steps:
104+
- uses: actions/checkout@v2
105+
- name: Cache node modules
106+
uses: actions/cache@v2
107+
env:
108+
cache-name: cache-node-modules
109+
with:
110+
path: ~/.npm
111+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
112+
restore-keys: |
113+
${{ runner.os }}-build-${{ env.cache-name }}-
114+
${{ runner.os }}-build-
115+
${{ runner.os }}-
116+
- uses: actions/[email protected]
117+
with:
118+
node-version: "12"
119+
- uses: ./.github/actions/dead-links
120+
121+
documentation-snippet-tests:
122+
name: Documentation Snippet Tests
123+
needs: [unit-tests]
124+
runs-on: ubuntu-18.04
125+
steps:
126+
- uses: actions/checkout@v2
127+
- name: Cache node modules
128+
uses: actions/cache@v2
129+
env:
130+
cache-name: cache-node-modules
131+
with:
132+
path: ~/.npm
133+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
134+
restore-keys: |
135+
${{ runner.os }}-build-${{ env.cache-name }}-
136+
${{ runner.os }}-build-
137+
${{ runner.os }}-
138+
- uses: actions/[email protected]
139+
with:
140+
node-version: "12"
141+
- uses: ./.github/actions/snippet-tests
142+
with:
143+
CYPRESS_RECORD_KEY_DOC: ${{ secrets.CYPRESS_RECORD_KEY_DOC }}

0 commit comments

Comments
 (0)