2021-02-01 08:06:06 -05:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
|
|
|
- image: penpotapp/devenv:latest
|
2022-11-03 04:35:19 -05:00
|
|
|
- image: cimg/postgres:14.5
|
2021-02-01 08:06:06 -05:00
|
|
|
environment:
|
|
|
|
POSTGRES_USER: penpot_test
|
|
|
|
POSTGRES_PASSWORD: penpot_test
|
2021-03-30 08:35:18 -05:00
|
|
|
POSTGRES_DB: penpot_test
|
2022-11-03 04:35:19 -05:00
|
|
|
- image: cimg/redis:7.0.5
|
2021-02-01 08:06:06 -05:00
|
|
|
|
|
|
|
working_directory: ~/repo
|
2023-12-04 13:13:14 -05:00
|
|
|
resource_class: medium+
|
2021-02-01 08:06:06 -05:00
|
|
|
|
|
|
|
environment:
|
2023-12-04 13:13:14 -05:00
|
|
|
JAVA_OPTS: -Xmx4g -Xms100m -XX:+UseSerialGC
|
|
|
|
NODE_OPTIONS: --max-old-space-size=4096
|
2021-02-01 08:06:06 -05:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
# Download and cache dependencies
|
|
|
|
- restore_cache:
|
2024-08-05 04:29:14 -05:00
|
|
|
keys:
|
|
|
|
- v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}-{{ checksum "common/deps.edn"}}
|
|
|
|
# fallback to using the latest cache if no exact match is found
|
|
|
|
- v1-dependencies-
|
2021-02-01 08:06:06 -05:00
|
|
|
|
2022-06-29 16:00:45 -05:00
|
|
|
- run: cd .clj-kondo && cat config.edn
|
2023-11-27 06:28:28 -05:00
|
|
|
- run: cat .cljfmt.edn
|
2023-11-29 10:22:56 -05:00
|
|
|
- run: clj-kondo --version
|
2022-06-29 16:00:45 -05:00
|
|
|
|
2024-01-05 07:43:38 -05:00
|
|
|
- run:
|
2024-05-23 06:21:15 -05:00
|
|
|
name: "backend fmt check"
|
2024-01-05 07:43:38 -05:00
|
|
|
working_directory: "./backend"
|
|
|
|
command: |
|
|
|
|
yarn install
|
|
|
|
yarn run fmt:clj:check
|
|
|
|
|
|
|
|
- run:
|
2024-05-23 06:21:15 -05:00
|
|
|
name: "exporter fmt check"
|
2024-01-05 07:43:38 -05:00
|
|
|
working_directory: "./exporter"
|
|
|
|
command: |
|
|
|
|
yarn install
|
|
|
|
yarn run fmt:clj:check
|
|
|
|
|
|
|
|
- run:
|
2024-05-23 06:21:15 -05:00
|
|
|
name: "common fmt check"
|
2024-01-05 07:43:38 -05:00
|
|
|
working_directory: "./common"
|
|
|
|
command: |
|
|
|
|
yarn install
|
|
|
|
yarn run fmt:clj:check
|
|
|
|
|
|
|
|
- run:
|
2024-05-23 06:21:15 -05:00
|
|
|
name: "frontend fmt check"
|
2024-01-05 07:43:38 -05:00
|
|
|
working_directory: "./frontend"
|
|
|
|
command: |
|
|
|
|
yarn install
|
|
|
|
yarn run fmt:clj:check
|
2024-06-28 03:49:55 -05:00
|
|
|
yarn run fmt:js:check
|
2022-11-03 04:35:19 -05:00
|
|
|
|
2021-06-18 03:25:17 -05:00
|
|
|
- run:
|
2024-05-23 06:21:15 -05:00
|
|
|
name: "common linter check"
|
2023-11-29 10:22:56 -05:00
|
|
|
working_directory: "./common"
|
2021-11-18 10:59:53 -05:00
|
|
|
command: |
|
2023-11-29 10:22:56 -05:00
|
|
|
yarn install
|
2023-11-27 06:28:28 -05:00
|
|
|
yarn run lint:clj
|
2021-06-18 03:25:17 -05:00
|
|
|
|
|
|
|
- run:
|
2024-05-23 06:21:15 -05:00
|
|
|
name: "frontend linter check"
|
2021-06-18 03:25:17 -05:00
|
|
|
working_directory: "./frontend"
|
2021-11-18 10:59:53 -05:00
|
|
|
command: |
|
2023-11-27 06:28:28 -05:00
|
|
|
yarn install
|
|
|
|
yarn run lint:scss
|
2023-11-29 10:22:56 -05:00
|
|
|
yarn run lint:clj
|
2021-02-01 08:06:06 -05:00
|
|
|
|
2022-11-03 04:35:19 -05:00
|
|
|
- run:
|
2024-05-23 06:21:15 -05:00
|
|
|
name: "backend linter check"
|
2023-11-29 10:22:56 -05:00
|
|
|
working_directory: "./backend"
|
|
|
|
command: |
|
|
|
|
yarn install
|
|
|
|
yarn run lint:clj
|
|
|
|
|
|
|
|
- run:
|
2024-05-23 06:21:15 -05:00
|
|
|
name: "exporter linter check"
|
2023-11-29 10:22:56 -05:00
|
|
|
working_directory: "./exporter"
|
2022-11-03 04:35:19 -05:00
|
|
|
command: |
|
|
|
|
yarn install
|
2023-11-29 10:22:56 -05:00
|
|
|
yarn run lint:clj
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: "common tests"
|
|
|
|
working_directory: "./common"
|
|
|
|
command: |
|
2022-11-08 04:40:19 -05:00
|
|
|
yarn test
|
2024-04-24 08:41:12 -05:00
|
|
|
clojure -M:dev:test
|
2022-11-03 04:35:19 -05:00
|
|
|
|
2021-02-01 08:06:06 -05:00
|
|
|
- run:
|
2023-11-29 10:22:56 -05:00
|
|
|
name: "frontend tests"
|
|
|
|
working_directory: "./frontend"
|
|
|
|
command: |
|
|
|
|
yarn install
|
|
|
|
yarn test
|
|
|
|
|
2024-05-23 06:21:15 -05:00
|
|
|
- run:
|
|
|
|
name: "frontend integration tests"
|
|
|
|
working_directory: "./frontend"
|
|
|
|
command: |
|
|
|
|
yarn install
|
2024-08-05 04:29:14 -05:00
|
|
|
yarn run build:app:assets
|
2024-06-06 00:48:41 -05:00
|
|
|
clojure -M:dev:shadow-cljs release main
|
2024-05-23 06:21:15 -05:00
|
|
|
yarn playwright install --with-deps chromium
|
2024-10-09 05:26:04 -05:00
|
|
|
yarn test:e2e
|
2024-05-09 06:17:12 -05:00
|
|
|
|
2023-11-29 10:22:56 -05:00
|
|
|
- run:
|
|
|
|
name: "backend tests"
|
2021-05-28 06:50:42 -05:00
|
|
|
working_directory: "./backend"
|
2022-11-03 04:35:19 -05:00
|
|
|
command: |
|
2024-05-29 11:01:28 -05:00
|
|
|
clojure -M:dev:test
|
2022-11-03 04:35:19 -05:00
|
|
|
|
2021-02-01 08:06:06 -05:00
|
|
|
environment:
|
2021-03-30 08:35:18 -05:00
|
|
|
PENPOT_TEST_DATABASE_URI: "postgresql://localhost/penpot_test"
|
|
|
|
PENPOT_TEST_DATABASE_USERNAME: penpot_test
|
|
|
|
PENPOT_TEST_DATABASE_PASSWORD: penpot_test
|
|
|
|
PENPOT_TEST_REDIS_URI: "redis://localhost/1"
|
2021-02-01 08:06:06 -05:00
|
|
|
|
|
|
|
- save_cache:
|
2024-08-05 04:29:14 -05:00
|
|
|
paths:
|
|
|
|
- ~/.m2
|
|
|
|
key: v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}-{{ checksum "common/deps.edn"}}
|