Skip to content

maor

maor #490

Workflow file for this run

name: build
on: [push, pull_request]
jobs:
lint:
if: false # Disabled until we can fmt black on merge with dmoj
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install black
run: pip install black
- name: Format with black
run: |
black --version
black . --skip-string-normalization --check
unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Cache pip
uses: actions/cache@v2
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 mysqlclient coverage
cp .ci.settings.py dmoj/local_settings.py
- name: Start MySQL
run: sudo systemctl start mysql.service
- name: Run unit tests
run: coverage run --source=. manage.py test judge
- name: Generate coverage report
run: coverage xml
- uses: codecov/codecov-action@v1
styles:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node 14
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install npm packages
run: npm install -g sass postcss-cli postcss autoprefixer
- name: Build style.css
run: ./make_style.sh