Create SECURITY.md #564
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: Django CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.11.5 | |
- name: Install system dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y redis postgresql | |
- name: Start Redis | |
run: sudo systemctl start redis | |
- name: Start PostgreSQL | |
run: sudo systemctl start postgresql | |
- name: Start MongoDB | |
uses: supercharge/mongodb-github-action@1.10.0 | |
with: | |
mongodb-version: 6.0 | |
- name: Create PostgreSQL user and database | |
run: | | |
sudo -u postgres psql -c "CREATE USER github WITH PASSWORD 'password';" | |
sudo -u postgres psql -c "ALTER ROLE github CREATEDB;" | |
sudo -u postgres psql -c "CREATE DATABASE github_action OWNER github;" | |
- name: Install Python requirements for project | |
run: | | |
pip install -U pip | |
pip install -r requirements.txt | |
- name: Create .env project file | |
run: | | |
cd constructor_telegram_bots | |
echo "POSTGRESQL_DATABASE_NAME=github_action" > .env | |
echo "POSTGRESQL_DATABASE_USER=github" >> .env | |
echo "POSTGRESQL_DATABASE_PASSWORD=password" >> .env | |
- name: Run project tests | |
run: | | |
cd constructor_telegram_bots | |
python manage.py test --verbosity 3 |