mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-29 00:17:48 +01:00
circleci split tests
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
test-backend:
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
- image: circleci/mariadb:latest
|
||||
@@ -20,32 +20,48 @@ jobs:
|
||||
keys:
|
||||
- backend-dependencies-{{ checksum "package.json" }}
|
||||
|
||||
- restore_cache:
|
||||
keys:
|
||||
- frontend-dependencies-{{ checksum "frontend/package.json" }}
|
||||
|
||||
- run:
|
||||
name: install backend deps
|
||||
command: npm i
|
||||
|
||||
- run:
|
||||
name: install frontend deps
|
||||
command: cd frontend && npm i
|
||||
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
key: backend-dependencies-{{ checksum "package.json" }}
|
||||
|
||||
- save_cache:
|
||||
paths:
|
||||
- frontend/node_modules
|
||||
key: frontend-dependencies-{{ checksum "frontend/package.json" }}
|
||||
|
||||
- run:
|
||||
name: test backend
|
||||
command: npm test
|
||||
|
||||
test-frontend:
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
|
||||
working_directory: ~/writer/frontend
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
|
||||
- restore_cache:
|
||||
keys:
|
||||
- frontend-dependencies-{{ checksum "package.json" }}
|
||||
|
||||
- run:
|
||||
name: install frontend deps
|
||||
command: npm i
|
||||
|
||||
- save_cache:
|
||||
paths:
|
||||
- frontend/node_modules
|
||||
key: frontend-dependencies-{{ checksum "package.json" }}
|
||||
|
||||
- run:
|
||||
name: test frontend
|
||||
command: cd frontend && npm test
|
||||
command: npm test
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
test:
|
||||
jobs:
|
||||
- test-backend
|
||||
- test-frontend
|
||||
Reference in New Issue
Block a user