Skip to content

Reset httperror on successful image request #1153

Reset httperror on successful image request

Reset httperror on successful image request #1153

Workflow file for this run

---
name: Django CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
ATLASSERVER_DJANGO_MYSQL_DBNAME: atlasserver
ATLASSERVER_DJANGO_MYSQL_USER: root
ATLASSERVER_DJANGO_MYSQL_PASSWORD: root
ATLASSERVER_EMAIL_HOST_USER: atlasforced@gmail.com
ATLASSERVER_DJANGO_SECRET_KEY: ${{secrets.ATLASSERVER_DJANGO_SECRET_KEY}}
jobs:
build:
environment: test
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ['3.12']
# services:
# mysql:
# image: mysql:5.7
# env:
# MYSQL_ALLOW_EMPTY_PASSWORD: yes
# MYSQL_DATABASE: atlasserver
# MYSQL_USER: root
# MYSQL_PASSWORD: password
# MYSQL_ROOT_PASSWORD: password
# ports:
# - 3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip uv wheel mod-wsgi-standalone mysqlclient
- name: Install package
run: |
cat atlasserver/settings_test.txt >> atlasserver/settings.py
uv pip install --system -e .
- name: Install geoip databases
run: ./update_geoipdatabase.sh
- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
echo "mysql started"
mysql -e "CREATE DATABASE ${{env.ATLASSERVER_DJANGO_MYSQL_DBNAME}};" -u${{env.ATLASSERVER_DJANGO_MYSQL_USER}} -p${{env.ATLASSERVER_DJANGO_MYSQL_PASSWORD}}
./manage.py makemigrations
./manage.py migrate
- name: Run Django Tests
run: |
./manage.py test
- name: Start and stop server
run: |
atlaswebserver start
atlastaskrunner start
atlastaskrunner stop
atlaswebserver stop