Skip to content

Commit

Permalink
Corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemKAF committed Oct 21, 2023
1 parent aca2230 commit 3fce5d2
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,35 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip --no-cache-dir
pip install flake8 ruff isort --no-cache-dir
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Git Clone Action
uses: actions/checkout@v2
with:
repository: ${{ github.repository }}
path: backend/
- name: Run flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 backend --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings
flake8 backend --count --exit-zero --max-complexity=10 --max-line-length=79 --statistics --config=setup.cfg
- name: Run ruff
run: |
python -m ruff check .
- name: Run isort
run: |
isort -c .
- name: Send report
uses: appleboy/telegram-action@master
with:
fail_ci_if_error: true
to: ${{ secrets.A_TG_TO }}
token: ${{ secrets.A_TG_TOKEN }}
message: |
В репозитории {{ github.repository }} проверка кода прошла
успешно.
Данные: {{ fail_ci_if_error }}
9 changes: 3 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ jobs:
name: Push frontend Docker image to DockerHub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker
uses: docker/login-action@v2
with:
Expand All @@ -53,7 +49,7 @@ jobs:
- name: Push to DockerHub
uses: docker/build-push-action@v4
with:
context: git@github.com:volunteers-for-city-projects/volunteers-frontend.git#deployDocker
context: https://github.com/volunteers-for-city-projects/volunteers-frontend.git#develop
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/volunteers_frontend:latest

Expand Down Expand Up @@ -84,7 +80,8 @@ jobs:
needs:
# Дождёмся билда всех образов
- build_backend_and_push_to_docker_hub
# - build_frontend_and_push_to_docker_hub
- build_frontend_and_push_to_docker_hub
- build_gateway_and_push_to_docker_hub
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand Down
1 change: 0 additions & 1 deletion backend/backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
'projects.apps.ProjectsConfig',
'users.apps.UsersConfig',
'corsheaders',
'check.apps.CheckConfig',
]

MIDDLEWARE = [
Expand Down
2 changes: 1 addition & 1 deletion infra_bt/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ services:

frontend:
build:
context: https://github.com/volunteers-for-city-projects/volunteers-frontend.git#feature/deployDocker
context: https://github.com/volunteers-for-city-projects/volunteers-frontend.git#develop
command:
- /bin/sh
- -c
Expand Down
5 changes: 3 additions & 2 deletions infra_bt/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
server {
listen 80;
server_tokens off;

root /usr/share/nginx/html;

Expand All @@ -21,8 +22,8 @@ server {
}

location / {
index index.html index.htm;
try_files $uri /index.html;
limit_except GET POST;
try_files $uri $uri/ =404;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down

0 comments on commit 3fce5d2

Please sign in to comment.