fix: Temporarily disable JavaScript files minification #243
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: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
test: | |
name: Django testing | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.10", "3.11"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Create .env | |
run: echo "TEST=1" > website/.env | |
- name: Install gettext | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: sudo apt-get install -y gettext | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
python -m pip install -r requirements-dev.txt | |
- name: Run tests | |
run: python website/manage.py test | |
linting: | |
name: Linting with ${{ matrix.name }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- {name: black, command: black . --check} | |
- {name: flake8, command: flake8 .} | |
- {name: isort, command: isort . --check} | |
- {name: pylint, command: 'pylint */**.py --evaluation "0 if fatal else max(0, 10 - error - warning)"'} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Create .env | |
run: echo "TEST=1" > website/.env | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python scripts/__init__.py setup --linting | |
- name: Run ${{ matrix.name }} | |
run: python -m ${{ matrix.command }} |