-
Notifications
You must be signed in to change notification settings - Fork 2
/
codefresh.yml
39 lines (39 loc) · 1.14 KB
/
codefresh.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
version: '1.0'
steps:
main_clone:
type: 'git-clone'
description: 'Cloning main repository...'
repo: x249/blog-api
revision: ${{CF_BRANCH}}
perform_tests:
image: node:12.14.0-alpine3.11
fail_fast: false
working_directory: ${{main_clone}}
description: 'Performing tests...'
environment: &test_postgresql_vars
- POSTGRES_USER=test_user
- POSTGRES_PASSWORD=super_secret_testing_db_password
- POSTGRES_DB=testing_database
commands:
- apk add curl bash
- apk add --virtual build-dependencies gcc g++ make python-dev
- npm i -g node-gyp
- yarn install
- apk del build-dependencies
- yarn knex migrate:up
- yarn test:coverage
- yarn knex migrate:down
- curl -s https://codecov.io/bash | bash -s coverage
services:
composition:
postgres:
image: postgres:12
ports:
- 5432
environment: *test_postgresql_vars # Same POSTGRES_USER, POSTGRES_PASSWORD etc.
readiness:
timeoutSeconds: 30
periodSeconds: 15
image: postgres:12
commands:
- 'pg_isready -h postgres'