2021-12-21 04:27:35 +01:00
|
|
|
name: PostgreSQL + Redis CI
|
2021-06-23 20:48:47 +02:00
|
|
|
|
2021-12-21 05:04:41 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
2021-06-23 20:48:47 +02:00
|
|
|
|
|
|
|
jobs:
|
2021-12-21 05:04:41 +01:00
|
|
|
test:
|
2021-12-21 04:27:35 +01:00
|
|
|
name: Run Tests with PostgreSQL and Redis
|
2021-06-23 20:48:47 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2021-06-29 22:27:35 +02:00
|
|
|
- uses: actions/checkout@v2
|
2021-06-23 20:48:47 +02:00
|
|
|
- name: Build the docker-compose stack
|
|
|
|
env:
|
|
|
|
PG_USER: ci_db_user
|
|
|
|
PG_PASS: ci_db_pass
|
2021-06-23 21:39:39 +02:00
|
|
|
run: docker-compose -f docker/docker-compose-ci.yml up -d
|
2021-06-23 20:48:47 +02:00
|
|
|
- name: Check running containers
|
|
|
|
run: docker ps
|
2021-06-29 22:27:35 +02:00
|
|
|
- uses: actions/setup-node@v2
|
2021-06-23 20:48:47 +02:00
|
|
|
- run: npm install
|
2021-06-29 22:03:40 +02:00
|
|
|
- name: Run Tests
|
2021-06-23 20:48:47 +02:00
|
|
|
env:
|
|
|
|
TEST_POSTGRES: true
|
2021-06-29 22:03:40 +02:00
|
|
|
timeout-minutes: 5
|
2021-06-23 20:48:47 +02:00
|
|
|
run: npm test
|