Merge pull request #97 from meilisearch/brunoocasali-patch-1 #141
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
pull_request: | |
push: | |
# trying and staging branches are for BORS config | |
branches: | |
- trying | |
- staging | |
- main | |
jobs: | |
scrap_tests: | |
runs-on: ubuntu-latest | |
name: Crawler tests | |
services: | |
meilisearch: | |
image: getmeili/meilisearch:latest | |
env: | |
MEILI_MASTER_KEY: "masterKey" | |
MEILI_NO_ANALYTICS: "true" | |
ports: | |
- "7700:7700" | |
strategy: | |
fail-fast: false | |
matrix: | |
node: ["16", "18", "20"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn | |
- name: Run playground | |
run: yarn playground:start & | |
- name: Run default strategy scraper | |
run: yarn start -p misc/config_examples/docusaurus-default.json | |
- name: Run docsearch strategy scraper | |
run: yarn start -p misc/config_examples/docusaurus-docsearch.json | |
- name: Run scrapix server | |
run: yarn serve & | |
- name: Wait | |
run: sleep 5 | |
- name: Call scrapix server | |
run: sh .github/scripts/scrapix_server_call_check.sh | |
lint_tests: | |
runs-on: ubuntu-latest | |
name: lint tests | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn | |
- name: Run JS/TS linter | |
run: yarn lint | |
build_test: | |
runs-on: ubuntu-latest | |
name: types-check | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn | |
- name: Build project | |
run: yarn build |