fix: register problem tasks with celery #4375
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: build | |
| on: [push, pull_request] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install flake8 | |
| run: pip install "setuptools<82" flake8 flake8-import-order flake8-future-import flake8-commas flake8-logging-format flake8-quotes | |
| - name: Lint with flake8 | |
| run: | | |
| flake8 --version | |
| flake8 | |
| unit: | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:8.0 | |
| env: | |
| MYSQL_ROOT_PASSWORD: root | |
| MYSQL_DATABASE: dmoj | |
| ports: | |
| - 13306:3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: pip-${{ runner.os }}-${{ secrets.CACHE_VERSION }}-${{ hashFiles('requirements.txt') }} | |
| - name: Install unit test dependencies | |
| run: | | |
| pip install wheel | |
| pip install -r requirements.txt | |
| pip install coverage | |
| cp .ci.settings.py dmoj/local_settings.py | |
| - name: Collect jsi18n | |
| run: python manage.py compilejsi18n | |
| - name: Run unit tests | |
| run: coverage run --source=. manage.py test judge urlshortener | |
| - name: Generate coverage report | |
| run: coverage xml | |
| styles: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| - name: Install npm packages | |
| run: npm ci | |
| - name: Build style.css | |
| run: ./make_style.sh |