Wagtail repo format and lint make commands (#60)

* Fix docstring

* Install make on frontend container

* Lint and format commands

* Update readme
pull/65/head
Jhonatan Lopes 2023-09-21 18:23:11 -03:00 zatwierdzone przez GitHub
rodzic bdb87e6fbe
commit e90654533d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 35 dodań i 3 usunięć

Wyświetl plik

@ -1,7 +1,7 @@
FROM node:18-slim
LABEL maintainer="hello@wagtail.org"
RUN apt-get update && apt-get install rsync -y
RUN apt-get update && apt-get install rsync make -y
COPY ./wagtail/package.json ./wagtail/package-lock.json ./
RUN npm --prefix / install --loglevel info

Wyświetl plik

@ -40,5 +40,14 @@ migrations: ## Make migrations to the wagtail bakery site
migrate: ## Migrate the wagtail bakery site migrations
docker-compose exec web python manage.py migrate
test: ## Run all wagtail tests or pass in a file with `make test file=wagtail.admin.tests.test_name.py`
test: ## Run all wagtail tests or pass in a file with `make test file=wagtail.admin.tests.test_name`
docker-compose exec -w /code/wagtail web python runtests.py $(file) $(FILE)
format-wagtail: ## Format Wagtail repo
docker-compose exec -w /code/wagtail web make format-server
docker-compose exec frontend make format-client
lint-wagtail: ## Lint the Wagtail repo (server, client, docs)
docker-compose exec -w /code/wagtail web make lint-server
docker-compose exec -w /code/wagtail web make lint-docs
docker-compose exec frontend make lint-client

Wyświetl plik

@ -154,7 +154,30 @@ make test file=wagtail.admin.tests.test_name.py
or
```sh
docker-compose exec -w /code/wagtail web python runtests.py wagtail.admin.tests.{test_file_name_here}.py
docker-compose exec -w /code/wagtail web python runtests.py wagtail.admin.tests.{test_file_name_here}
```
### Format Wagtail codebase
```sh
make format-wagtail
```
or
```sh
docker-compose exec -w /code/wagtail web make format-server
docker-compose exec frontend make format-client
```
### Lint Wagtail codebase
```sh
make lint-wagtail
```
or
```sh
docker-compose exec -w /code/wagtail web make lint-server
docker-compose exec -w /code/wagtail web make lint-docs
docker-compose exec frontend make lint-client
```
### Open a Django shell session