speckle-server/.circleci/config.yml

46 строки
1.2 KiB
YAML

version: 2.1
# TODO:
# add build workflow for frontend
# rename server test workflow
# add linting jobs
# run jobs/workflows on correct package changes (not all...)
workflows:
version: 2.1
build:
jobs:
- test_server
jobs:
test_server:
docker:
- image: 'circleci/node:12'
- image: 'circleci/redis:6'
- image: 'circleci/postgres:12'
environment:
POSTGRES_DB: speckle2_test
POSTGRES_PASSWORD: speckle
POSTGRES_USER: speckle
environment:
NODE_ENV: test
DATABASE_URL: 'postgres://speckle:speckle@localhost:5432/speckle2_test'
PGDATABASE: speckle2_test
PGUSER: speckle
SESSION_SECRET: 'keyboard cat'
STRATEGY_LOCAL: true
CANONICAL_URL: 'http://localhost:3000'
# Note: some of these commands need to be run in the server package folder.
steps:
- checkout
- run:
command: 'npm install'
working_directory: 'packages/server'
- run: 'dockerize -wait tcp://localhost:5432 -timeout 1m'
- run:
command: 'npm run test'
working_directory: 'packages/server'
- run:
command: 'bash <(curl -s https://codecov.io/bash)'
working_directory: 'packages/server'