From 6305602cb6204fa4d5cbba8c8824240788993b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alessandro=20Pezz=C3=A8?= Date: Mon, 6 Feb 2023 12:10:08 +0100 Subject: [PATCH 1/2] chore: add target [skip ci] --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 268691c7..d5e03209 100755 --- a/Makefile +++ b/Makefile @@ -18,6 +18,9 @@ dev-install: # Install developer requirements + base requirements setup: # Set up the project database python manage.py migrate ${local_config} +build-db: # Build database + echo "from data.v2.build import build_all; build_all()" | python manage.py shell ${local_config} + wipe-sqlite-db: # Delete's the project database rm -rf db.sqlite3 From adbf204c5f631be0c0affb277c33ec80b49c0868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alessandro=20Pezz=C3=A8?= Date: Mon, 6 Feb 2023 12:15:23 +0100 Subject: [PATCH 2/2] chore: enable build in circleci pipeline [skip ci] --- .circleci/config.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f1a7542..9d88e45b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,26 @@ jobs: - run: name: Run tests command: make test - + build: + docker: + - image: cimg/python:3.10.9 + steps: + - checkout + - run: + name: Pull Submodules + command: | + git submodule init + git submodule update --remote + - run: + name: Install deps + command: make install + - run: + name: Run migrations + command: make setup + - run: + name: Build database + command: make build-db + deploy: machine: image: ubuntu-2004:202111-01 # https://circleci.com/docs/2.0/configuration-reference/#available-machine-images with Docker 18.09.3. Newer images don't work @@ -44,9 +63,11 @@ workflows: test-and-deploy: jobs: - test + - build - deploy: requires: - test + - build filters: branches: only: @@ -55,6 +76,7 @@ workflows: weekly: jobs: - test + - build - deploy: requires: - test