3.0.0-0 #466
This file contains hidden or 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: [push, pull_request] | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
services: | |
typesense: | |
image: typesense/typesense:29.0 | |
ports: | |
- 8108:8108 | |
volumes: | |
- /tmp/typesense-data:/data | |
- /tmp/typesense-analytics:/analytics | |
env: | |
TYPESENSE_API_KEY: xyz | |
TYPESENSE_DATA_DIR: /data | |
TYPESENSE_ENABLE_CORS: true | |
TYPESENSE_ANALYTICS_DIR: /analytics | |
TYPESENSE_ENABLE_SEARCH_ANALYTICS: true | |
steps: | |
- name: Wait for Typesense | |
run: | | |
timeout 20 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8108/health)" != "200" ]]; do sleep 1; done' || false | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
cache: npm | |
- run: npm ci | |
- run: npm run build | |
- run: npm run ci-lint | |
- run: npm run test | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: coverage/ | |
retention-days: 1 | |