Skip to content

Improve HttpRequests #3161

Improve HttpRequests

Improve HttpRequests #3161

Workflow file for this run

name: Tests
on:
pull_request:
push:
# trying and staging branches are for BORS config
branches:
- trying
- staging
- main
jobs:
integration_tests:
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
# Will not run if the event is a PR to pre-release-beta/*
# Will not run if the event is a PR to prototype-beta/*
# Will not run if the event is a push on pre-release-beta/*
# Will still run for each push to bump-meilisearch-v* and prototype-beta/*
if: |
github.event_name != 'pull_request' ||
!startsWith(github.base_ref, 'bump-meilisearch-v') &&
!startsWith(github.base_ref, 'pre-release-beta/') &&
!startsWith(github.base_ref, 'prototype-beta/') &&
!startsWith(github.head_ref, 'pre-release-beta/')
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: ['18', '20']
name: integration-tests (Node.js ${{ matrix.node }})
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- name: Install dependencies
run: yarn --dev
- name: Run tests
run: yarn test
- name: Build project
run: yarn build
- name: Run ESM env
run: yarn test:env:esm
- name: Run Node.js env
run: yarn test:env:nodejs
- name: Run node typescript env
run: yarn test:env:node-ts
- name: Run Browser env
run: yarn test:env:browser
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
style_tests:
runs-on: ubuntu-latest
name: style-check
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Install dependencies
run: yarn --dev
- name: Run code style check
run: yarn style
- name: Run yaml style check
uses: ibiqlik/action-yamllint@v3
with:
config_file: .yamllint.yml
types_tests:
runs-on: ubuntu-latest
name: types-check
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Install dependencies
run: yarn --dev
- name: Build project
run: yarn build
- name: Run types check
run: yarn types