Scrapix V2 #159
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: Test | |
on: | |
push: | |
branches: [main, staging] | |
pull_request: | |
branches: [main, staging] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
meilisearch: | |
image: getmeili/meilisearch:latest | |
env: | |
MEILI_MASTER_KEY: "masterKey" | |
MEILI_NO_ANALYTICS: "true" | |
ports: | |
- 7700:7700 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- name: Wait for Meilisearch | |
run: | | |
timeout 30s bash -c ' | |
until curl -s -f -o /dev/null "http://localhost:7700/health"; do | |
echo "Waiting for Meilisearch to be ready..." | |
sleep 1 | |
done | |
' | |
- name: Run tests | |
run: npm test | |
env: | |
MEILISEARCH_URL: http://localhost:7700 | |
MEILISEARCH_API_KEY: masterKey |