-
Fredrik Jonsson authoredFredrik Jonsson authored
config.yml 3.81 KiB
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2.1
executors:
python:
docker:
- image: cimg/python:3.9
node:
docker:
- image: cimg/node:12.22
with-database:
docker:
- image: cimg/python:3.9
environment:
DATABASE_URL: postgresql://hypha:hypha@localhost/hypha?sslmode=disable
DJANGO_SETTINGS_MODULE: hypha.settings.test
SEND_MESSAGES: false
- image: cimg/postgres:12.9
environment:
POSTGRES_USER: hypha
POSTGRES_PASSWORD: hypha
POSTGRES_DB: hypha
jobs:
build-fe:
executor: node
working_directory: ~/repo
steps:
- checkout
- run:
name: set owner on /usr/local
command: sudo chown -R circleci:circleci /usr/local
- restore_cache:
keys:
- v3-npm-{{ .Branch }}-{{ checksum "package-lock.json" }}
- v3-npm-{{ .Branch }}-
- v3-npm-
- run:
name: builds static assets
command: |
npm install --quiet
npm install -g gulp-cli
gulp deploy
- save_cache:
paths:
- ./node_modules
- /usr/local/lib/node_modules
- /usr/local/bin
key: v3-npm-{{ .Branch }}-{{ checksum "package-lock.json" }}
- persist_to_workspace:
root: ~/repo
paths:
- hypha/static_compiled
- node_modules
lint-fe:
executor: node
working_directory: ~/repo
steps:
- checkout
- attach_workspace:
at: ~/repo
- run:
name: run linting
command: npm run lint
test-fe: