Skip to content

Add loading tests

Add loading tests #10

Workflow file for this run

name: Tests
on:
pull_request:
jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run unit tests
run: pytest -v -m "not integration" --tb=short
integration-tests:
name: Integration Tests
runs-on: ubuntu-latest
services:
redis:
image: redis:alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 10
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Load test data into Redis
run: |
python -c "
import asyncio
from node_normalizer.loader import NodeLoader
loader = NodeLoader('tests/data/config.json')
asyncio.run(loader.load(100_000))
"
- name: Run integration tests
run: pytest -v -m "integration" --tb=short