Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions .github/workflows/beta-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
outputs:
docker-version: ${{ steps.grep-step.outputs.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Grep docker beta version of Meilisearch
id: grep-step
run: |
Expand All @@ -25,38 +25,39 @@ jobs:
runs-on: ubuntu-latest
needs: ['grep-docker-version']
# Only test on Google Chrome
container: cypress/browsers:node12.18.3-chrome87-ff82
services:
meilisearch:
image: getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }}
env:
MEILI_MASTER_KEY: 'masterKey'
MEILI_NO_ANALYTICS: 'true'
ports:
- '7700:7700'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '14.x'
- name: Meilisearch (${{ needs.grep-docker-version.outputs.docker-version }}) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }} meilisearch --master-key=masterKey --no-analytics
node-version: 16
cache: yarn
- name: Install dependencies
run: yarn --dev && yarn --cwd ./tests/env/react
- name: Setup Meilisearch Index
run: yarn local:env:setup
- name: Run local browser tests
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v3
with:
wait-on: 'http://localhost:7700'
# Tests are only done on one playground to avoid long testing time
start: yarn local:env:react
env: playground=local
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos
Expand All @@ -65,21 +66,29 @@ jobs:
tests:
runs-on: ubuntu-latest
needs: ['grep-docker-version']
services:
meilisearch:
image: getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }}
env:
MEILI_MASTER_KEY: 'masterKey'
MEILI_NO_ANALYTICS: 'true'
ports:
- '7700:7700'
strategy:
fail-fast: false
matrix:
node: ['12', '14', '16']
node: ['14', '16', '18']
name: integration-tests (Node.js ${{ matrix.node }})
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '14.x'
- name: Meilisearch (${{ needs.grep-docker-version.outputs.docker-version }}) setup with Docker
Expand Down
73 changes: 13 additions & 60 deletions .github/workflows/pre-release-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,14 @@ on:
jobs:
cypress-run:
runs-on: ubuntu-latest
# Only test on Google Chrome
container: cypress/browsers:node12.18.3-chrome87-ff82
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "14.x"
node-version: 16
cache: yarn
- name: Install dependencies
run: yarn --dev && yarn --cwd ./tests/env/react
- name: Grep latest version of Meilisearch
Expand All @@ -43,15 +36,16 @@ jobs:
- name: Run local browser tests
uses: cypress-io/github-action@v2
with:
wait-on: 'http://localhost:7700'
# Tests are only done on one playground to avoid long testing time
start: yarn local:env:react
env: playground=local
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos
Expand All @@ -62,16 +56,15 @@ jobs:
strategy:
fail-fast: false
matrix:
node: ["12", "14", "16"]
node: ['14', '16', '18']
name: integration-tests (Node.js ${{ matrix.node }})
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
cache: yarn
node-version: ${{ matrix.node }}
- name: Get the latest Meilisearch RC
run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV
- name: Meilisearch (${{ env.MEILISEARCH_VERSION }}) setup with Docker
Expand All @@ -82,43 +75,3 @@ jobs:
run: yarn test
- name: Build project
run: yarn build

style:
name: style-check
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: yarn install
- name: Tests style
run: yarn lint
- name: Yaml Style
uses: ibiqlik/action-yamllint@v3
with:
config_file: .yamllint.yml
types_test:
runs-on: ubuntu-latest
name: types-check
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
- name: Setup node
uses: actions/setup-node@v2
- name: Install dependencies
run: yarn --dev
- name: Build project
run: yarn build
- name: Run types check
run: yarn types
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
registry-url: https://registry.npmjs.org/
Expand Down
86 changes: 41 additions & 45 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,43 @@ on:

jobs:
cypress-run:
runs-on: ubuntu-latest
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
# Will still run for each push to bump-meilisearch-v*
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
runs-on: ubuntu-latest
# Only test on Google Chrome
container: cypress/browsers:node12.18.3-chrome87-ff82
services:
meilisearch:
image: getmeili/meilisearch:latest
env:
MEILI_MASTER_KEY: 'masterKey'
MEILI_NO_ANALYTICS: 'true'
ports:
- '7700:7700'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "14.x"
- name: Download the latest stable version of Meilisearch
run: |
curl -L https://install.meilisearch.com | sh
chmod +x meilisearch
- name: Run Meilisearch
run: |
./meilisearch --master-key=masterKey --no-analytics &
node-version: 16
cache: yarn
- name: Install dependencies
run: yarn --dev && yarn --cwd ./tests/env/react
- name: Setup Meilisearch Index
run: yarn local:env:setup
- name: Run local browser tests
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v3
with:
wait-on: 'http://localhost:7700'
# Tests are only done on one playground to avoid long testing time
start: yarn local:env:react
env: playground=local
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-videos
Expand All @@ -62,21 +57,26 @@ jobs:
# Will still run for each push to bump-meilisearch-v*
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
runs-on: ubuntu-latest
services:
meilisearch:
image: getmeili/meilisearch:latest
env:
MEILI_MASTER_KEY: 'masterKey'
MEILI_NO_ANALYTICS: 'true'
ports:
- '7700:7700'
strategy:
fail-fast: false
matrix:
node: ["12", "14", "16"]
node: ['14', '16', '18']
name: integration-tests (Node.js ${{ matrix.node }})
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
- name: Docker setup
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --no-analytics --master-key='masterKey'
cache: yarn
node-version: ${{ matrix.node }}
- name: Install dependencies
run: yarn install
- name: Run tests
Expand All @@ -91,13 +91,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
node-version: 16
cache: yarn
- name: Install dependencies
run: yarn install
- name: Tests style
Expand All @@ -113,15 +112,12 @@ jobs:
runs-on: ubuntu-latest
name: types-check
steps:
- uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- name: Install dependencies
run: yarn --dev
- name: Build project
Expand Down
3 changes: 2 additions & 1 deletion bors.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
status = [
'style-check',
'types-check',
'integration-tests (Node.js 12)',
'integration-tests (Node.js 14)',
'integration-tests (Node.js 16)',
'integration-tests (Node.js 18)',
'cypress-run'
]
# 1 hour timeout
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"rollup-plugin-babel": "^4.4.0",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-plugin-terser": "^7.0.0",
"rollup-plugin-typescript2": "^0.30.0",
"rollup-plugin-typescript2": "^0.32.1",
"shx": "^0.3.3",
"ts-jest": "^27.0.7",
"tslib": "^2.4.0",
Expand Down
Loading