Skip to content

Merge pull request #5 from use-py/rename_priority_to_properties #53

Merge pull request #5 from use-py/rename_priority_to_properties

Merge pull request #5 from use-py/rename_priority_to_properties #53

Workflow file for this run

name: test suite
on:
push:
paths:
- "src/**"
- "tests/**"
pull_request:
paths:
- "src/**"
- "tests/**"
jobs:
test:
strategy:
fail-fast: true
matrix:
os: [ "ubuntu-latest" ]
python-version: [ "3.8", "3.9", "3.10" ]
runs-on: ${{ matrix.os }}
services:
rabbitmq:
image: rabbitmq:3
options: >-
--health-cmd "rabbitmqctl node_health_check"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: admin
RABBITMQ_DEFAULT_VHOST: /
ports:
- 5672:5672
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install library
run: poetry install --no-interaction
- name: Run tests
timeout-minutes: 1 # 设置步骤超时时间为 1 分钟
env:
RABBITMQ_HOST: rabbitmq
RABBITMQ_USERNAME: admin
RABBITMQ_PASSWORD: admin
run: |
source .venv/bin/activate
pytest tests/