fix: update docker compose settings - change container name #11
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: AlertApp CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.12] | |
services: | |
mongodb: | |
image: mongo | |
ports: | |
- 27017:27017 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Run Tests | |
run: | | |
cd src | |
poetry run python manage.py test | |
env: | |
MONGODB_HOST: ${{ secrets.MONGODB_HOST }} | |
MONGODB_PORT: ${{ secrets.MONGODB_PORT }} | |
MONGODB_NAME: ${{ secrets.MONGODB_NAME }} | |
- name: Run Bandit | |
run: | | |
poetry run bandit -c pyproject.toml -r . | |
- name: Run Safety | |
run: | | |
poetry run safety check | |
- name: Run Ruff | |
run: | | |
poetry run ruff . |