0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 06:58:58 -05:00

🎉 Add frontend tests to circleci.

This commit is contained in:
Andrey Antukh 2021-02-01 16:59:19 +01:00
parent 650c8bfc9e
commit 4e9d599e64

View file

@ -21,7 +21,7 @@ jobs:
environment: environment:
# Customize the JVM maximum heap limit # Customize the JVM maximum heap limit
JVM_OPTS: -Xmx512m JVM_OPTS: -Xmx1g
steps: steps:
- checkout - checkout
@ -29,20 +29,20 @@ jobs:
# Download and cache dependencies # Download and cache dependencies
- restore_cache: - restore_cache:
keys: keys:
- v1-dependencies-{{ checksum "backend/deps.edn" }} - v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}
# fallback to using the latest cache if no exact match is found # fallback to using the latest cache if no exact match is found
- v1-dependencies- - v1-dependencies-
# run lint # run lint
- run: - run:
working_directory: "./backend" working_directory: "./backend"
name: lint name: backend lint
command: "clj-kondo --lint src/" command: "clj-kondo --lint src/"
# run test # run test
- run: - run:
working_directory: "./backend" working_directory: "./backend"
name: test name: backend test
command: "clojure -M:dev:tests" command: "clojure -M:dev:tests"
environment: environment:
PENPOT_DATABASE_URI: "postgresql://localhost/penpot" PENPOT_DATABASE_URI: "postgresql://localhost/penpot"
@ -50,8 +50,17 @@ jobs:
PENPOT_DATABASE_PASSWORD: penpot_test PENPOT_DATABASE_PASSWORD: penpot_test
PENPOT_REDIS_URI: "redis://localhost/1" PENPOT_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: - save_cache:
paths: paths:
- ~/.m2 - ~/.m2
key: v1-dependencies-{{ checksum "backend/deps.edn" }} key: v1-dependencies-{{ checksum "backend/deps.edn" }}-{{ checksum "frontend/deps.edn"}}