Amélioration du temps d'indexation #47
Workflow file for this run
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: Build & Test | |
on: pull_request | |
jobs: | |
search: | |
runs-on: ubuntu-latest | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2 | |
ports: | |
- 9200/tcp | |
options: -e="discovery.type=single-node" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build typescript | |
run: npm run build | |
- name: Run linter | |
run: npm run lint | |
- name: Run typecheck | |
run: npm run types | |
- name: Verify Elasticsearch connection from host | |
env: | |
ELASTICSEARCH_URL: http://localhost:${{ job.services.elasticsearch.ports[9200] }} | |
run: | | |
echo $ELASTICSEARCH_URL | |
curl -fsSL "$ELASTICSEARCH_URL/_cat/health?h=status" | |
- name: Run tests | |
env: | |
ELASTICSEARCH_URL: http://localhost:${{ job.services.elasticsearch.ports[9200] }} | |
run: npm test -- --forceExit |