0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 16:00:19 -05:00
penpot/.circleci/config.yml

102 lines
2.8 KiB
YAML
Raw Normal View History

2021-02-01 08:06:06 -05:00
version: 2
jobs:
build:
docker:
- image: penpotapp/devenv:latest
- 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
- image: cimg/redis:7.0.5
2021-02-01 08:06:06 -05:00
working_directory: ~/repo
resource_class: large
2021-02-01 08:06:06 -05:00
environment:
# Customize the JVM maximum heap limit
JVM_OPTS: -Xmx4g
2021-02-01 08:06:06 -05:00
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}-{{ checksum "common/deps.edn"}}
2021-02-01 08:06:06 -05:00
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: cd .clj-kondo && cat config.edn
- run:
name: frontend styles prettier
working_directory: "./frontend"
command: |
yarn install
yarn run lint-scss
- run:
name: common lint
working_directory: "./common"
2021-11-18 10:59:53 -05:00
command: |
clj-kondo --version
clj-kondo --parallel --lint src/
- run:
name: frontend lint
working_directory: "./frontend"
2021-11-18 10:59:53 -05:00
command: |
clj-kondo --version
clj-kondo --parallel --lint src/
2021-02-01 08:06:06 -05:00
- run:
2021-02-01 10:59:19 -05:00
name: backend lint
working_directory: "./backend"
2021-11-18 10:59:53 -05:00
command: |
clj-kondo --version
clj-kondo --parallel --lint src/
2021-02-01 08:06:06 -05:00
- run:
working_directory: "./common"
name: common tests
command: |
yarn install
yarn test
clojure -X:dev:test :patterns '["common-tests.*-test"]'
environment:
PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
JVM_OPTS: -Xmx4g
NODE_OPTIONS: --max-old-space-size=4096
2021-02-01 08:06:06 -05:00
- run:
2021-02-01 10:59:19 -05:00
name: backend test
working_directory: "./backend"
command: |
clojure -X:dev:test :patterns '["backend-tests.*-test"]'
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"
JVM_OPTS: -Xmx4g
2021-02-01 08:06:06 -05:00
2021-02-01 10:59:19 -05:00
- run:
name: frontend tests
working_directory: "./frontend"
command: |
yarn install
yarn test
environment:
2021-12-02 12:20:45 -05:00
PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
NODE_OPTIONS: --max-old-space-size=4096
2021-02-01 08:06:06 -05:00
- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}-{{ checksum "common/deps.edn"}}
2021-02-01 08:06:06 -05:00