diff --git a/.circleci/config.yml b/.circleci/config.yml index 1d6dea9a..b9557ccf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,12 +45,6 @@ commands: working_directory: ./sematic/ui command: npm run lint - validate-schemas: - description: Validates all dev resource schemas are up-to-date and consistent - steps: - - run: - name: Check DB Schema - command: make migrate_up_sqlite && make update-schema && git diff --exit-code installation-tests: description: Do a test of installing sematic via wheel steps: @@ -100,16 +94,6 @@ jobs: at: /home/circleci - do-static-analysis - schemas: - docker: - - image: $SEMATIC_CI_IMAGE - auth: - username: $SEMATIC_DOCKERHUB_USER - password: $SEMATIC_DOCKERHUB_PASSWORD - steps: - - attach_workspace: - at: /home/circleci - - validate-schemas installation: docker: - image: $SEMATIC_CI_IMAGE @@ -191,9 +175,6 @@ workflows: - lint: requires: - init - - schemas: - requires: - - init - installation: requires: - init @@ -206,6 +187,5 @@ workflows: - finalize: requires: - lint - - schemas - integration-test - fe-unit-tests diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e481cb4e..db97d4a5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,6 +15,8 @@ jobs: run: | source .venv/bin/activate pytest + - name: Check Schemas + run: make migrate_up_sqlite && make update-schema && git diff --exit-code - name: Wheel run: | make ui diff --git a/Makefile b/Makefile index 9be2f7e7..a5ba52e7 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,10 @@ migrate_up_rds: cd sematic; DATABASE_URL=${DATABASE_URL} dbmate -s db/schema.sql.pg up migrate_up_sqlite: - bazel run //sematic/db:migrate -- up --verbose --env local --schema-file ${PWD}/sematic/db/schema.sql.sqlite + source .venv/bin/activate && python3 ./sematic/db/migrate.py up --verbose --env local --schema-file ${PWD}/sematic/db/schema.sql.sqlite migrate_down_sqlite: - bazel run //sematic/db:migrate -- down --verbose --env local --schema-file ${PWD}/sematic/db/schema.sql.sqlite + source .venv/bin/activate && python3 ./sematic/db/migrate.py down --verbose --env local --schema-file ${PWD}/sematic/db/schema.sql.sqlite clear_sqlite: sqlite3 ~/.sematic/db.sqlite3 < sematic/db/scripts/clear_all.sql @@ -41,20 +41,10 @@ py-sync: .PHONY: update-schema update-schema: - bazel run //sematic/db:migrate -- dump --schema-file ${PWD}/sematic/db/schema.sql.sqlite + source .venv/bin/activate && python3 ./sematic/db/migrate.py dump --schema-file ${PWD}/sematic/db/schema.sql.sqlite -# this is not supported on Mac because some of the dependencies that need to be pulled -# do not have a release version for Mac refresh-dependencies: -ifeq ($(UNAME_S),Linux) - bazel run //requirements:requirements3_8.update - bazel run //requirements:requirements3_9.update - bazel run //requirements:requirements3_10.update - bazel run //requirements:requirements3_11.update -else - echo "${RED}Refreshing dependencies should only be done from Linux${NO_COLOR}" - exit 1 -endif + uv lock .PHONY: ui ui: sematic/ui/node_modules/.build_timestamp