remove dulwich module #129
This file contains hidden or 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: Django Test | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| - "master" | |
| pull_request: | |
| branches: | |
| - "main" | |
| - "master" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| # ⚡ OpenSSL уже есть в образе, установка не нужна | |
| # если хочешь проверить наличие: | |
| - name: Check OpenSSL version | |
| run: openssl version | |
| - name: Generate private and public keys | |
| run: | | |
| rm -rf security | |
| mkdir -p security | |
| openssl genpkey -algorithm RSA -out security/private_key.pem -pkeyopt rsa_keygen_bits:2048 | |
| openssl rsa -pubout -in security/private_key.pem -out security/public_key.pem | |
| echo "Private key saved as security/private_key.pem" | |
| echo "Public key saved as security/public_key.pem" | |
| - name: Create .env file | |
| run: | | |
| touch .env | |
| echo PRIVATE_KEY_PATH=$(pwd)/security/private_key.pem >> .env | |
| echo PUBLIC_KEY_PATH=$(pwd)/security/public_key.pem >> .env | |
| echo DJANGO_SETTINGS_MODULE=core.settings.development >> .env | |
| echo DATABASE_ENVIRON=sqlite3 >> .env | |
| - name: Check if .env has been updated | |
| run: cat .env | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run Tests | |
| run: python manage.py test | |
| - name: Clean up keys (Optional) | |
| if: always() | |
| run: | | |
| rm -rf security | |
| echo "Keys removed after use." |