✨ feat: cli #165
Workflow file for this run
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 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", "3.11" ] | |
runs-on: ${{ matrix.os }} | |
services: | |
redis: | |
image: redis:latest | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
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 | |
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 --all-extras | |
- name: Install library | |
run: poetry install --no-interaction --all-extras | |
- name: Run tests | |
run: | | |
source .venv/bin/activate | |
pytest tests/ |