chore(deps): bump actions/setup-node from 5 to 6 #383
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: 'Unit Tests' | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
unittest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- '3.x' | |
- 3.13 | |
services: | |
rabbitmq: | |
image: rabbitmq | |
env: | |
RABBITMQ_DEFAULT_USER: guest | |
RABBITMQ_DEFAULT_PASS: guest | |
ports: | |
- 5672:5672 | |
redis: | |
image: redis | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
steps: | |
- if: github.server_url != 'https://github.com' | |
run: sleep 20s | |
- uses: actions/checkout@v5 | |
with: | |
submodules: true | |
- uses: actions/setup-python@v6 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r requirements-dev.txt | |
- name: Type check | |
run: mypy servc --check-untyped-defs | |
- name: Run tests | |
env: | |
CACHE_URL: redis://${{ github.server_url != 'https://github.com' && 'redis' || 'localhost' }} | |
BUS_URL: amqp://guest:guest@${{ github.server_url != 'https://github.com' && 'rabbitmq' || 'localhost' }} | |
run: | | |
pip install coverage | |
coverage run -m unittest tests/*.py | |
coverage report -m --fail-under=60 |