Skip to content

Commit

Permalink
chore: merge branch 'release/v6.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuthor committed Dec 22, 2022
2 parents 7cc4dfb + 1b5c093 commit e6b9daf
Show file tree
Hide file tree
Showing 227 changed files with 9,904 additions and 11,741 deletions.
17 changes: 7 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,22 @@
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": [
"./tsconfig.json"
]
"project": ["./tsconfig.json"]
},
"plugins": [
"jsdoc"
],
"plugins": ["jsdoc"],
"rules": {
"@typescript-eslint/no-empty-interface": 0,
"no-labels": 0,
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "all",
"ignoreRestSiblings": false
}
]
],
"jsdoc/require-param-type": 0,
"jsdoc/require-returns-type": 0
},
"ignorePatterns": [
"tests/wasm_lib"
]
"ignorePatterns": ["src/pkg"]
}
282 changes: 282 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
---
name: CI
on: push

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Cache build
uses: actions/cache@v3
with:
path: |
node_modules
dist
key: build-${{ github.run_id }}

- name: Install dependencies and build
run: npm install

build_in_docker:
runs-on: ubuntu-latest
container: cosmian/node_ci_puppeteer

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Cache build
uses: actions/cache@v3
with:
path: |
/github/home/.cache/puppeteer
node_modules
dist
key: build-docker-${{ github.run_id }}

- name: Install dependencies and build
run: npm install

lint:
runs-on: ubuntu-latest
needs: build

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Cache build
uses: actions/cache@v3
with:
path: |
node_modules
dist
key: build-${{ github.run_id }}

- name: Check Prettier
run: npm run prettier:check

- name: Lint
run: npm run lint

test:
runs-on: ubuntu-latest
container: cosmian/node_ci_puppeteer
needs: build_in_docker

services:
kms:
image: cosmian/kms
env:
COSMIAN_SERVER_URL: http://localhost:9998
KMS_PUBLIC_PATH: /tmp
KMS_PRIVATE_PATH: /tmp
KMS_SHARED_PATH: /tmp

redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Cache build
uses: actions/cache@v3
with:
path: |
/github/home/.cache/puppeteer
node_modules
dist
key: build-docker-${{ github.run_id }}

- name: Test
run: npm test
env:
REDIS_HOST: redis
KMS_HOST: kms

example_vuejs:
runs-on: ubuntu-latest
container: cosmian/node_ci_puppeteer
needs: build_in_docker

services:
kms:
image: cosmian/kms
env:
COSMIAN_SERVER_URL: http://localhost:9998
KMS_PUBLIC_PATH: /tmp
KMS_PRIVATE_PATH: /tmp
KMS_SHARED_PATH: /tmp

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Cache build
uses: actions/cache@v3
with:
path: |
/github/home/.cache/puppeteer
node_modules
dist
key: build-docker-${{ github.run_id }}

- name: Test VueJS
run: |
cd examples/vuejs
npm install
npm run build
npm run serve -- --port 8090 &
sleep 5
cd ../test
node chrome.mjs http://localhost:8090 http://kms:9998
example_reactjs:
runs-on: ubuntu-latest
container: cosmian/node_ci_puppeteer
needs: build_in_docker

services:
kms:
image: cosmian/kms
env:
COSMIAN_SERVER_URL: http://localhost:9998
KMS_PUBLIC_PATH: /tmp
KMS_PRIVATE_PATH: /tmp
KMS_SHARED_PATH: /tmp

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Cache build
uses: actions/cache@v3
with:
path: |
/github/home/.cache/puppeteer
node_modules
dist
key: build-docker-${{ github.run_id }}

- name: Test ReactJS
run: |
cd examples/reactjs
npm install
npm run build
npm run serve -- --port 8090 &
sleep 5
cd ../test
node chrome.mjs http://localhost:8090 http://kms:9998
example_webpack:
runs-on: ubuntu-latest
needs: build

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Cache build
uses: actions/cache@v3
with:
path: |
node_modules
dist
key: build-${{ github.run_id }}

- name: Test Webpack
run: |
cd examples/webpack
npm install
npx webpack
example_nodejs:
runs-on: ubuntu-latest
container: cosmian/node_ci_puppeteer
needs: build_in_docker

services:
kms:
image: cosmian/kms
env:
COSMIAN_SERVER_URL: http://localhost:9998
KMS_PUBLIC_PATH: /tmp
KMS_PRIVATE_PATH: /tmp
KMS_SHARED_PATH: /tmp

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Cache build
uses: actions/cache@v3
with:
path: |
/github/home/.cache/puppeteer
node_modules
dist
key: build-docker-${{ github.run_id }}

- name: Test NodeJS
run: |
cd examples/nodejs
npm install
node test.mjs 10
env:
KMS_HOST: kms

example_imdb:
runs-on: ubuntu-latest
needs: build

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Cache build
uses: actions/cache@v3
with:
path: |
node_modules
dist
key: build-${{ github.run_id }}

- name: Test IMDB
run: |
cd examples/nodejs_search_imdb
curl https://datasets.imdbws.com/title.basics.tsv.gz --output imdb.tsv.gz
gzip -d imdb.tsv.gz
npm install
node test.mjs
example_full_text_search:
runs-on: ubuntu-latest
needs: build

steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Cache build
uses: actions/cache@v3
with:
path: |
node_modules
dist
key: build-${{ github.run_id }}

- name: Test Full Text Search
run: |
cd examples/full_text_search
npm install
node test.mjs
24 changes: 24 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Publish to NPM

on:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Install dependencies and build
run: npm install

- name: Set NPM token
run: echo "//registry.npmjs.org/:_authToken=$NPM_ACCESS_TOKEN" > ~/.npmrc
env:
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

- name: Publish to NPM
run: npm publish
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ site/*.js
dist/
pgdata/
package-lock.json
demo/demo.tar
Loading

0 comments on commit e6b9daf

Please sign in to comment.