fix(ci): add GITEA_TOKEN for git clone authentication
This commit is contained in:
@@ -17,7 +17,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git .
|
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ secrets.GITEA_TOKEN }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||||
git checkout ${GITHUB_SHA}
|
git checkout ${GITHUB_SHA}
|
||||||
|
|
||||||
- name: Install Python and uv
|
- name: Install Python and uv
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git .
|
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ secrets.GITEA_TOKEN }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||||
git checkout ${GITHUB_SHA}
|
git checkout ${GITHUB_SHA}
|
||||||
|
|
||||||
- name: Install Python and uv
|
- name: Install Python and uv
|
||||||
@@ -86,7 +86,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git .
|
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ secrets.GITEA_TOKEN }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||||
git checkout ${GITHUB_SHA}
|
git checkout ${GITHUB_SHA}
|
||||||
|
|
||||||
- name: Build web image
|
- name: Build web image
|
||||||
@@ -110,7 +110,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 --branch=${GITHUB_REF_NAME} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git .
|
git clone --depth=1 --branch=${GITHUB_REF_NAME} https://oauth2:${{ secrets.GITEA_TOKEN }}@${GITHUB_SERVER_URL#*://}/${GITHUB_REPOSITORY}.git .
|
||||||
git checkout ${GITHUB_SHA}
|
git checkout ${GITHUB_SHA}
|
||||||
|
|
||||||
- name: Login to Gitea Container Registry
|
- name: Login to Gitea Container Registry
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
"""Тесты для BackgroundJob."""
|
"""Тесты для BackgroundJob."""
|
||||||
|
|
||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
from faker import Faker
|
||||||
|
|
||||||
from apps.core.models import BackgroundJob, JobStatus
|
from apps.core.models import BackgroundJob, JobStatus
|
||||||
from apps.core.services import BackgroundJobService
|
from apps.core.services import BackgroundJobService
|
||||||
from django.test import TestCase
|
|
||||||
from faker import Faker
|
|
||||||
|
|
||||||
fake = Faker()
|
fake = Faker()
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
"""Tests for core services"""
|
"""Tests for core services"""
|
||||||
|
|
||||||
|
from django.contrib.auth import get_user_model
|
||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
from apps.core.exceptions import NotFoundError
|
from apps.core.exceptions import NotFoundError
|
||||||
from apps.core.services import BaseService
|
from apps.core.services import BaseService
|
||||||
from django.contrib.auth import get_user_model
|
|
||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
User = get_user_model()
|
User = get_user_model()
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
"""Tests for core signals utilities"""
|
"""Tests for core signals utilities"""
|
||||||
|
|
||||||
|
|
||||||
|
from django.contrib.auth import get_user_model
|
||||||
|
from django.db.models.signals import post_save, pre_save
|
||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
from tests.apps.user.factories import UserFactory
|
||||||
|
|
||||||
from apps.core.signals import (
|
from apps.core.signals import (
|
||||||
SignalDispatcher,
|
SignalDispatcher,
|
||||||
emit_password_changed,
|
emit_password_changed,
|
||||||
@@ -12,11 +18,6 @@ from apps.core.signals import (
|
|||||||
user_registered,
|
user_registered,
|
||||||
user_verified,
|
user_verified,
|
||||||
)
|
)
|
||||||
from django.contrib.auth import get_user_model
|
|
||||||
from django.db.models.signals import post_save, pre_save
|
|
||||||
from django.test import TestCase
|
|
||||||
|
|
||||||
from tests.apps.user.factories import UserFactory
|
|
||||||
|
|
||||||
User = get_user_model()
|
User = get_user_model()
|
||||||
|
|
||||||
|
|||||||
@@ -3,15 +3,17 @@
|
|||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
|
from django.test import TestCase, tag
|
||||||
|
|
||||||
|
from faker import Faker
|
||||||
|
from openpyxl import Workbook
|
||||||
|
|
||||||
from apps.parsers.clients.base import BaseHTTPClient, HTTPClientError
|
from apps.parsers.clients.base import BaseHTTPClient, HTTPClientError
|
||||||
from apps.parsers.clients.minpromtorg.industrial import IndustrialProductionClient
|
from apps.parsers.clients.minpromtorg.industrial import IndustrialProductionClient
|
||||||
from apps.parsers.clients.minpromtorg.manufactures import ManufacturesClient
|
from apps.parsers.clients.minpromtorg.manufactures import ManufacturesClient
|
||||||
from apps.parsers.clients.minpromtorg.schemas import IndustrialCertificate, Manufacturer
|
from apps.parsers.clients.minpromtorg.schemas import IndustrialCertificate, Manufacturer
|
||||||
from apps.parsers.clients.proverki import ProverkiClient
|
from apps.parsers.clients.proverki import ProverkiClient
|
||||||
from apps.parsers.clients.proverki.schemas import Inspection
|
from apps.parsers.clients.proverki.schemas import Inspection
|
||||||
from django.test import TestCase, tag
|
|
||||||
from faker import Faker
|
|
||||||
from openpyxl import Workbook
|
|
||||||
|
|
||||||
fake = Faker("ru_RU")
|
fake = Faker("ru_RU")
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
"""Tests for parsers services."""
|
"""Tests for parsers services."""
|
||||||
|
|
||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
from faker import Faker
|
||||||
|
|
||||||
from apps.parsers.clients.minpromtorg.schemas import IndustrialCertificate, Manufacturer
|
from apps.parsers.clients.minpromtorg.schemas import IndustrialCertificate, Manufacturer
|
||||||
from apps.parsers.clients.proverki.schemas import Inspection
|
from apps.parsers.clients.proverki.schemas import Inspection
|
||||||
from apps.parsers.models import (
|
from apps.parsers.models import (
|
||||||
@@ -16,8 +20,6 @@ from apps.parsers.services import (
|
|||||||
ParserLoadLogService,
|
ParserLoadLogService,
|
||||||
ProxyService,
|
ProxyService,
|
||||||
)
|
)
|
||||||
from django.test import TestCase
|
|
||||||
from faker import Faker
|
|
||||||
|
|
||||||
from .factories import (
|
from .factories import (
|
||||||
IndustrialCertificateRecordFactory,
|
IndustrialCertificateRecordFactory,
|
||||||
@@ -585,9 +587,10 @@ class InspectionServiceTest(TestCase):
|
|||||||
self.assertEqual(record.load_batch, 1) # Original batch
|
self.assertEqual(record.load_batch, 1) # Original batch
|
||||||
|
|
||||||
|
|
||||||
|
from django.test import tag
|
||||||
|
|
||||||
from apps.parsers.clients.base import HTTPClientError
|
from apps.parsers.clients.base import HTTPClientError
|
||||||
from apps.parsers.clients.minpromtorg.industrial import IndustrialProductionClient
|
from apps.parsers.clients.minpromtorg.industrial import IndustrialProductionClient
|
||||||
from django.test import tag
|
|
||||||
|
|
||||||
|
|
||||||
@tag("integration", "slow", "network", "e2e")
|
@tag("integration", "slow", "network", "e2e")
|
||||||
|
|||||||
Reference in New Issue
Block a user