diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index d614f34..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: CI -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - test: - name: Test - runs-on: ubuntu-latest - services: - redis: - image: redis:6 - ports: ['6379:6379'] - rabbitmq: - image: rabbitmq:3 - ports: ['5672:5672'] - strategy: - matrix: - broker: [memory, redis, rabbitmq] - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - id: setup-python - with: - python-version: 3.12 - - - 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@v4 - with: - path: .venv - key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - - - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: | - poetry install --no-interaction --no-root - source .venv/bin/activate - - - name: Test - run: | - source .venv/bin/activate - pytest --broker=${{ matrix.broker }} --ignore .poetry --cov diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d22281b..32d9f7d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -110,3 +110,45 @@ jobs: run: | source .venv/bin/activate pylint $(git ls-files -- '*.py' ':!:**/migrations/*.py') + + pytest: + runs-on: ubuntu-latest + services: + redis: + image: redis:6 + ports: ['6379:6379'] + rabbitmq: + image: rabbitmq:3 + ports: ['5672:5672'] + strategy: + matrix: + broker: [memory, redis, rabbitmq] + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set Up Python + uses: actions/setup-python@v5 + id: setup-python + with: + python-version: 3.12 + - 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@v4 + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + - name: Install Dependencies + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + run: | + poetry install --no-interaction --no-root + source .venv/bin/activate + - name: Run Pytest + run: | + source .venv/bin/activate + pytest --broker=${{ matrix.broker }} --ignore .poetry --cov