mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 00:10:11 -05:00
66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
version: 2
|
|
jobs:
|
|
build:
|
|
docker:
|
|
# specify the version you desire here
|
|
- image: penpotapp/devenv:latest
|
|
|
|
# Specify service dependencies here if necessary
|
|
# CircleCI maintains a library of pre-built images
|
|
# documented at https://circleci.com/docs/2.0/circleci-images/
|
|
# - image: circleci/postgres:9.4
|
|
- image: circleci/postgres:13.1-ram
|
|
environment:
|
|
POSTGRES_USER: penpot_test
|
|
POSTGRES_PASSWORD: penpot_test
|
|
POSTGRES_DB: penpot_test
|
|
|
|
- image: circleci/redis:6.0.8
|
|
|
|
working_directory: ~/repo
|
|
|
|
environment:
|
|
# Customize the JVM maximum heap limit
|
|
JVM_OPTS: -Xmx1g
|
|
|
|
steps:
|
|
- checkout
|
|
|
|
# Download and cache dependencies
|
|
- restore_cache:
|
|
keys:
|
|
- v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}
|
|
# fallback to using the latest cache if no exact match is found
|
|
- v1-dependencies-
|
|
|
|
# run lint
|
|
- run:
|
|
working_directory: "./backend"
|
|
name: backend lint
|
|
command: "clj-kondo --lint src/"
|
|
|
|
# run test
|
|
- run:
|
|
working_directory: "./backend"
|
|
name: backend test
|
|
command: "clojure -M:dev:tests"
|
|
environment:
|
|
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"
|
|
|
|
- run:
|
|
working_directory: "./frontend"
|
|
name: frontend tests
|
|
command: |
|
|
yarn install
|
|
npx shadow-cljs compile tests
|
|
environment:
|
|
PATH: /usr/local/nodejs/bin/:/usr/local/bin:/bin:/usr/bin
|
|
|
|
- save_cache:
|
|
paths:
|
|
- ~/.m2
|
|
key: v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}
|
|
|