From c66acadd4388aec11b0ee3d9ff04955e18cb1880 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 12 Jun 2022 15:52:45 +0100 Subject: [PATCH] Only use `just` during development This makes the CI tasks more verbose, but makes the whole setup much easier to manage --- .gitlab-ci.yml | 35 +++++++++++++++++------------------ README.md | 7 +------ 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3c605ec..7e6635f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,28 +40,14 @@ pip: - ./env/ expire_in: 30 mins -just: - stage: build - before_script: - - apt-get update && apt-get install -y curl - script: - - curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to $CI_PROJECT_DIR/.just-bin - artifacts: - name: 'pip-$CI_JOB_ID' - paths: - - $CI_PROJECT_DIR/.just-bin - expire_in: 30 mins - .python_test_template: &python_test_template stage: test dependencies: - pip - collect_static - static - - just before_script: - source env/bin/activate - - mv $CI_PROJECT_DIR/.just-bin/just /usr/local/bin/just variables: SECRET_KEY: super-secret @@ -71,11 +57,9 @@ collect_static: dependencies: - pip - static - - just needs: - pip - static - - just script: - ./manage.py collectstatic --noinput -v2 --clear artifacts: @@ -97,7 +81,22 @@ django_checks: - ./manage.py check - ./manage.py makemigrations --check --noinput -python_lint: +black: <<: *python_test_template script: - - just lint + - black --check website + +isort: + <<: *python_test_template + script: + - isort --check website + +flake8: + <<: *python_test_template + script: + - flake8 website + +mypy: + <<: *python_test_template + script: + - mypy website diff --git a/README.md b/README.md index ab7f94a..c50fecb 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,4 @@ This project handles commands using [`just`](https://github.com/casey/just). ### `.env` file -Local development secrets are stored in a `.env` file. - -These values are required for the application to load - -- `DEBUG` set to `false` -- `SECRET_KEY` set to [something](https://django-secret-key-generator.netlify.app/) semi-random +Local development secrets are stored in a `.env` file. This file is automatically loaded by `just`.