Solved add to card,authentication and remove the card problem #59
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: Backend API | |
on: | |
push: | |
paths: | |
- "backend/**" | |
- ".github/workflows/backend.yml" | |
env: | |
SECRET_KEY: django-insecure-97(!!1=_(2xgj%)pp2&6bn8x@0^g6b1ps5ea24*i2tnc-!3%tq | |
ENVIRONMENT: LOCAL | |
USE_S3: False | |
REDIS_HOST: redis | |
REDIS_PORT: 6379 | |
REDIS_DB: 1 | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.10.0] | |
poetry-version: [1.7.1] | |
os: [windows-latest] | |
runs-on: windows-latest | |
defaults: | |
run: | |
working-directory: backend/ | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10.0 | |
- name: Install poetry | |
run: | | |
python -m pip install poetry==1.7.1 | |
- name: Configure poetry | |
run: | | |
python -m poetry config virtualenvs.in-project true | |
- name: Cache the virtualenv | |
uses: actions/cache@v2 | |
with: | |
path: ./.venv | |
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: | | |
python -m poetry install | |
- name: Run tests | |
run: poetry run pytest | |
- name: Run tests with pytest | |
run: poetry run pytest --cov=./ --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
code-quality: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.10.0] | |
poetry-version: [1.7.1] | |
os: [windows-latest] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: backend/ | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10.0 | |
- name: Install poetry | |
run: | | |
python -m pip install poetry==1.7.1 | |
- name: Configure poetry | |
run: | | |
python -m poetry config virtualenvs.in-project true | |
- name: Cache the virtualenv | |
uses: actions/cache@v2 | |
with: | |
path: ./.venv | |
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
run: | | |
python -m poetry install | |
- name: Run black | |
run: poetry run black . | |
- name: Run isort | |
run: poetry run isort . --profile black | |
- name: Run flake8 | |
run: poetry run flake8 . | |
- name: Run bandit | |
run: poetry run bandit . |