Water restrictions in UW #882
Workflow file for this run
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: CI, approaching CD | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - dev | |
| pull_request: | |
| branches: | |
| - master | |
| - dev | |
| jobs: | |
| run_jobs: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:17 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_USER: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - name: Build database | |
| run: psql -c "CREATE DATABASE githubactions;" -U postgres -h localhost -p 5432 | |
| env: | |
| PGPASSWORD: postgres | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.13' | |
| - name: Checkout branch | |
| uses: actions/checkout@v3 | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install coverage coveralls pyarrow pandas # for one_cache tests | |
| env: | |
| PIP_USE_MIRRORS: true | |
| - name: Ruff | |
| run: | | |
| ruff check ./alyx | |
| - name: Run tests | |
| run: | | |
| sudo mkdir /var/log/alyx | |
| sudo touch /var/log/alyx/django.log | |
| sudo chmod 666 /var/log/alyx/django.log | |
| cd alyx | |
| cp ./alyx/environment_template.env ./alyx/.env | |
| cp ../deploy/docker/settings-deploy.py alyx/settings.py | |
| cp ../deploy/docker/settings_lab-deploy.py alyx/settings_lab.py | |
| python manage.py collectstatic --noinput --link | |
| coverage run manage.py test -n | |
| coveralls --service=github | |
| env: | |
| DJANGO_SETTINGS_MODULE: alyx.settings | |
| PYTHONPATH: $HOME/builds/cortexlab/alyx | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| APACHE_LOG_DIR: /var/log/alyx | |
| POSTGRES_HOST: localhost |